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

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:

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

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.

on a windows 10 based VM, have installed Java on C:

C:\ords>java -version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

and Oracle DB 21c XE, Oracle Apex 22.1, now i am trying to install ORDS but it is showing error:

c:\ords\javar -jar ords.war install  
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/dbtools/launcher/executable/jar/ExecutableJarEntrypoint has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)

i have set path to my jdk installation folder

C:\Java\jdk1.8.0_261\bin

what i am doing wrong or missing something? please help.

regards

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

drs357 opened this issue

Jun 19, 2019

· 5 comments

Comments

Hello when I double click on the .jar file I get the error:

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

This is on a windows 10 machine, can someone please help me?

Thanks

What version of the Artemis software do you have installed?
If it's the latest (18.0.2) then you will need Java version 9 or above (ideally version 11.0.2) installed. Java can be downloaded from here: http://jdk.java.net/archive/

If you bring up a DOS window and type:

java -version

what version does it show?

You could also try right-clicking on the artemis jar and selecting Open with... Java.

Thank you, I needed to update the jdk.

Thank you!

Same issue I am working with jdk 1.8.0_291

I too am experiencing the same problem. When i type java -version into cmd it returns:

java version "1.8.0_301" Java(TM) SE Runtime Environment (build 1.8.0_301-b09) Java HotSpot(TM) Client VM (build 25.301-b09, mixed mode)

When i try and open the Artemis.jar file howveer i am still getting theses two errors:

Error: A JNI error has occured, please check your installation and try again
A Java Exception has occurred

@mattbird567 - Later versions of Artemis do not work with Java 1.8 (your installed version). You will need to upgrade your Java version, e.g. Java 11 - see the download GitHub page for details.