0

I have a minecraft server running on a linux server i have at home, the server has been running fine in "snapshot 17w06a" for months without any issue. But now i want to update it to the "Minecraft 1.12-pre-release". I can easily set the server up locally on my PC, but when i try to run it on the server, it fails and gives the message below.

I have literally tried everything but it does not seem to work, i have even tried to copy the exact same folder that worked local on this PC onto the server. But it just won't start.

jens@clipster:~/Mc$ java -Xms1024M -Xmx2048M -jar minecraft_server.1.12.jar 
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/MinecraftServer : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

jens@clipster:~/Mc$

I would really appreciate any help i can get, than

Kenster
  • 23,465
  • 21
  • 80
  • 106
  • On your server please tell us the output when you issue: `sudo java -version` – ThrowingSpoon May 11 '17 at 09:36
  • for non-Java *specialist*, have a look at [1.12 - Official Minecraft Wiki](http://minecraft.gamepedia.com/1.12) - `This is the first version to use, and thus require, Java 8` – user85421 May 11 '17 at 14:48

1 Answers1

0

If you look at Java docs of UnsupportedClassVersionError class it says:

  • Thrown when the Java Virtual Machine attempts to read a class
  • file and determines that the major and minor version numbers
  • in the file are not supported.

So JVM on your linux server doesn't support the version of JDK used to compile the new code. Version 52, implies your new code was compiler using JDK 1.8 and my guess is your Linux server runs any older Java version and hence this error.

rentedrainbow
  • 184
  • 2
  • 10