[SOLVED] Cannot create SpongeVanilla server. Getting exception when running .jar file

I am running Ubuntu 18.04.

I installed the SpongeVanilla jar, moved it to a directory, and ran the jar file using terminal.


Here is my terminal output when I ran the jar file:

Downloading the versions manifest…
Downloading minecraft_server.1.12.2.jar… This can take a while.
Successfully downloaded minecraft_server.1.12.2.jar and verified checksum!
Downloading launchwrapper-1.12.jar… This can take a while.
Successfully downloaded launchwrapper-1.12.jar and verified checksum!
Exception in thread “main” java.lang.NoClassDefFoundError: net/minecraft/launchwrapper/Launch
at org.spongepowered.server.launch.VanillaServerMain.main(VanillaServerMain.java:126)
at org.spongepowered.server.launch.VersionCheckingMain.main(VersionCheckingMain.java:38)
Caused by: java.lang.ClassNotFoundException: net.minecraft.launchwrapper.Launch
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
… 2 more

Thanks for your help!

EDIT Solved. See comment marked solution. This AskUbuntu post helped me switch to Java 8.

When you run java -version what is the output…?

LaunchWrapper, and by extension Sponge, doesn’t run on Java beyond Java 8 - you’re running a version with modules (which Java 8 doesn’t have).

The solution here is, you need to be running Java 8 :slight_smile: