0

I have recently been trying to run a minecraft server and it gives me an error:

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

And

A Java Exception has occurred.

When I use the Java -jar server.jar command in command prompt it says:

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(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)

So... Can someone help me?

  • Short answer: you are using a Java version that is too old for the Minecraft code that you are trying to run. This is probably not a programming problem, but in case it is, I have closed this as a dup of the canonical Q&A for this exception. – Stephen C Nov 27 '21 at 14:07
  • 1
    @StephenC Question: How do I fix this exactly? – lolstamp_DEV Nov 27 '21 at 14:10
  • By using the right version of Java. Probably Java 11. Try reading the installation instructions of whatever version of Minecraft you are trying to use. – Stephen C Nov 27 '21 at 14:12

0 Answers0