-
Bug
-
Resolution: Duplicate
-
None
-
21w20a
-
None
-
Windows 10, Java 8.291. Java Minecraft Server. I'm not sure how to tell what version of server I have. I have no JDK installed that I know of. Using snapshot 21W20A and the datapack for Caves & Cliffs.
-
Unconfirmed
-
(Unassigned)
This is possibly a duplicate of 225505 (but on Minecraft Server). However, that ticket was resolved in error. Please do NOT resolve this ticket as a duplicate unless 225505 is reopened.
I haven't run my server since 21W17A, so the development note that Java (SDK) 16 is now required probably applies. However, it has absolutely nothing to do with the launcher, since the launcher isn't even running at the time of the error. The error comes when I try to bring up my server with
java -Xmx2G -Xms2G -jar server.jar nogui
This has worked for months. Now it immediately generates the error "Error: A JNI error has occurred" (full text below).
Singleplayer running any of the snapshots and datapacks between 17 and 20 has worked. I've been playing singleplayer throughout this period, and it still works.
NOTE on 225505: the submitter specified the correct version of the JDK in the ticket, despite the Mod Note. That's why I say it was resolved in error. However, my ticket might be legitimately a separate ticket, as that one doesn't state whether s/he's running server or singleplayer. Certainly the note about the launcher being a culprit is unrelated to my ticket.
If it is determined that the server code I'm running needs to be updated (to include SDK 16), then please include information as to how to do that as part of the resolution. Copying the old development note that does not include that information is not sufficient.
Full text of the error message:
Error: 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 fi
le versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
- duplicates
-
MC-225505 A JNI error has occurred, please check your installation and try again
- Resolved