Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-237233

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 21w37a
    • None
    • AdoptOpenJDK (JDK) 16.0.1.9 (without module jdk.jfr)
      Minecraft 21w37a
      Windows 10
    • Unconfirmed
    • (Unassigned)

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

       

      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.

            Unassigned Unassigned
            teddyxlandlee Teddy Li
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: