So Im having an issue booting up a modded mc server installation using forge 1.12.2. The reason is unknown but I've had this issue before. All I've heard was to reinstall Java, even though I have done that multiple times.
Here is what my directory looks like:
This is stored inside c:desktop/server
. Here is the server boot code: java -Xmx1024M -jar forge-universal.jar nogui
.
Here is the error, I cannot understand what any of it means, and there is no offical minecraft crash log:
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
... 6 more
You seems to be on Java 16. You can check with java -version
.
Forge 1.12 can't be runned with this version of Java. So, I suggest you to :
C:\Dir\To\Jre\java.exe -Xmx1024M -jar forge-universal.jar nogui
JAVA_PATH
variable to the Java 8 JRE instead of Java 16's one.