CMD Error For New Server
Hello, I'm trying to set up a home server on a new computer I bought specifically for the purpose of running game servers, especially Minecraft.
It's been a long time since I've done this, and I'm already running into a problem right at the jump. I'm getting this error:
>
C:\\Users\\Starfish\\Desktop\\MC Server>java -jar server.jar --nogui
>Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.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)
I downloaded the server from the Minecraft website. I also ran the command for what version of Java I have:
>
C:\\Users\\Starfish\\Desktop\\MC Server>java -version
>java version "1.8.0\_471"
>Java(TM) SE Runtime Environment (build 1.8.0\_471-b09)
>Java HotSpot(TM) Client VM (build 25.471-b09, mixed mode, sharing)
What am I missing?
It's been a long time since I've done this, and I'm already running into a problem right at the jump. I'm getting this error:
>
C:\\Users\\Starfish\\Desktop\\MC Server>java -jar server.jar --nogui
>Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.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)
I downloaded the server from the Minecraft website. I also ran the command for what version of Java I have:
>
C:\\Users\\Starfish\\Desktop\\MC Server>java -version
>java version "1.8.0\_471"
>Java(TM) SE Runtime Environment (build 1.8.0\_471-b09)
>Java HotSpot(TM) Client VM (build 25.471-b09, mixed mode, sharing)
What am I missing?
Commentaires
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
To be save you can just install the newest version of Java from the Oracle website. Then make sure the correct java version is called for the server.
You can do that by either having the new one replace Java8 as your default (so "java --version" should say "JDK25" or something like that) or by explicitly telling it to use the new version by making the server command "path/to/java25/bin/java.exe ..."
If you're gonna make a vanilla server, I would actually recommend making a Fabric server instead by downloading the [Fabric Installer](https://fabricmc.net/use/installer/) and using its server tab. This also gives you the option ato auto-generated correct start-scripts. With a fabric server you can add mods like lithium that significantly improve server performance while still giving you a completely vanilla experience.