Y
Y
Yeldos Sabyrbayev2021-09-05 08:56:23
Java
Yeldos Sabyrbayev, 2021-09-05 08:56:23

How to solve the problem: "A JNI error has occurred, please check your installation and try again"?

I create a minecraft server on a VPS server according to the guide .

When executing the command java -Xmx1024M -Xms1024M -jar server.jar nogui, an error is displayed:

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 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:352)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
  at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)


Java version:
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)


I understand that the problems are in some versions of Java. Can you give step by step instructions? I have macos

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BorLaze, 2021-09-05
@yeldos23

Class File Versions
That is, the server is compiled for java 16, and you have 8 installed. What are the instructions here? Take down 8, put in 16.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question