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

A JNI error has occurred, please check your installation and try again

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • None
    • 21w19a
    • None
    • Operating System: Windows 10
      Java: JDK 16.0.0 JRE 8.291
      RAM: 4 GB
      GPU: Intel HD Graphics. (I running Minecraft)
      OpenGL 3.1
      Minecraft Java snapshot 21w19A.
    • Community Consensus
    • (Unassigned)

    Description

      Mod Notice

      Error messages:

      A JNI error has occurred, please check your installation and try again
      A Java exception has occurred.

      A JNI error has occurred, please check your installation and try again
      Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0

      This error happens when you launch the client (the game) or server (the .jar) without Java 16 in 21w19 and above. Minecraft has was updated to use Java 16 as per the 21w19a changelog:

      Minecraft now uses a more recent version of Java. If you are using a default setup the Launcher will download and install the correct version. If you are using a custom Java setup or a third-party launcher, you will need to ensure that your Java installation is version 16 or above.

      To fix this issue, download the AdoptOpenJDK and follow the steps below for the client or server.

      Client: Make sure that your launcher is running Java 16. To do so, change the Java executable runtime to target "javaw.exe" in C:\Program Files\Java\jdk-16.0.1\bin\javaw.exe or where you installed Java 16. Contact your launcher maintainers if you cannot switch or do not know how to switch to Java 16.

      Server: If you are running a server on your computer, make sure that AdoptOpenJDK is running the .jar. To make sure on Windows 10, the file properties should look like this:

      Try uninstalling Java 8 and restart your computer to make sure you are running Java 16. If you are running a server with a host, contact the host.

      If none if this works, please contact Community Support.

      When I open Minecraft it throws me the error: "A JNI error has occurred, please check your installation and try again" and "A Java exception ocurred", I really don't know, I have the latest version of Java and opengl 3.1. Please help me.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              DanielTpHd Daniel Andrés De La Hoz Coha
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                CHK: