mojira.dev
MC-237233

`NoClassDefFoundError: jdk.jfr.FlightRecorderListener` while using third-party JDKs without module `jdk.jfr`

Using AdoptOpenJDK 16.0.1.9 and launch Minecraft 21w37a without mods, my game crashes like this: (NoClassDefFoundError)

[media]

 

Module jdk.jfr is not included in most of the third-party OpenJDKs.

In my opinion, Minecraft should check if module jdk,jfr exists or class jdk.jfr.FlightRecorderListener exists. If it doesn't exist, JFR-related things (commands, etc.) should not be loaded or registered.

Why do I mention this? Because more and more players tend to use OpenJDK releases instead of OracleJDK. If Mojang does not solve this problem in time, it will limit the players' choice of different Java Runtimes, which is not a good thing for the future of Minecraft.

If it is too difficult (REALLY?) to add this check, you can just extract jdk.jfr as a moduled jar (which is not as stable as the previous one).

--------------------

I have double-checked that the latest release of AdoptOpenJDK/SemeruOpenJDK (JDK) does not contain module jdk.jfr either.

Attachments

Comments 2

Thank you for your report!
However, this issue is Invalid.

Your game, launcher or server is modified.
If you can reproduce the issue in a vanilla environment, please recreate the issue.

  • Any non-standard client/server/launcher build needs to be taken up with the appropriate team, not Mojang.

  • Any plugin issues need to be addressed to the creator of the plugin or resource pack.

  • If you have problems on large servers, such as The Hive and Hypixel, please contact them first as they run modified server software.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Because more and more players tend to use OpenJDK releases instead of OracleJDK.

By default, yep. Minecraft is already using a build of OpenJDK provided by Microsoft starting in 1.17.

"C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-openj9\bin\java.exe" [...] --versionType "HMCL 3.3.200"

HMCL is a third-party launcher not supported by Mojang Studios. However the issue of Minecraft not starting without JFR is already being tracked at MC-236795.

teddyxlandlee

(Unassigned)

Unconfirmed

(Unassigned)

21w37a

Retrieved