Brucewastaken / minecraft-server-on-heroku-template

20 stars 94 forks source link

java version error for 1.17.1 #8

Open ghost opened 3 years ago

ghost commented 3 years ago

followed the tutorial step by step until i ran into this error:

short error:

2021-07-19T17:31:10.504931+00:00 app[web.1]: Error: A JNI error has occurred, please check your installation and try again

2021-07-19T17:31:10.505564+00:00 app[web.1]: 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

long error:

2021-07-19T17:31:10.403630+00:00 app[web.1]: **script**: starting server

2021-07-19T17:31:10.411829+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 

2021-07-19T17:31:10.504931+00:00 app[web.1]: Error: A JNI error has occurred, please check your installation and try again

2021-07-19T17:31:10.505564+00:00 app[web.1]: 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

2021-07-19T17:31:10.505719+00:00 app[web.1]:     at java.lang.ClassLoader.defineClass1(Native Method)

2021-07-19T17:31:10.505829+00:00 app[web.1]:     at java.lang.ClassLoader.defineClass(ClassLoader.java:756)

2021-07-19T17:31:10.505897+00:00 app[web.1]:     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

2021-07-19T17:31:10.505966+00:00 app[web.1]:     at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)

2021-07-19T17:31:10.506033+00:00 app[web.1]:     at java.net.URLClassLoader.access$100(URLClassLoader.java:74)

2021-07-19T17:31:10.506097+00:00 app[web.1]:     at java.net.URLClassLoader$1.run(URLClassLoader.java:369)

2021-07-19T17:31:10.506162+00:00 app[web.1]:     at java.net.URLClassLoader$1.run(URLClassLoader.java:363)

2021-07-19T17:31:10.506233+00:00 app[web.1]:     at java.security.AccessController.doPrivileged(Native Method)

2021-07-19T17:31:10.506316+00:00 app[web.1]:     at java.net.URLClassLoader.findClass(URLClassLoader.java:362)

2021-07-19T17:31:10.506378+00:00 app[web.1]:     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)

2021-07-19T17:31:10.506461+00:00 app[web.1]:     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)

2021-07-19T17:31:10.506531+00:00 app[web.1]:     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

2021-07-19T17:31:10.506615+00:00 app[web.1]:     at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
eltrevii commented 2 years ago

This means you have to run this thing with a newer Java version (Try Java 17). I had this problem before.

unknown951258563465335 commented 2 years ago

This means you have to run this thing with a newer Java version (Try Java 17). I had this problem before.

how do u change the version

eltrevii commented 2 years ago

This means you have to run this thing with a newer Java version (Try Java 17). I had this problem before.

how do u change the version

...downloading and installing java 17 maybe?