. Advertisement .
..3..
. Advertisement .
..4..
I am new to programs and searching the a problem occurred running the server launcher.java.lang.reflect.invocationtargetexception to understand it better. It seems it doesn’t work as expected when I used some suggestions before. This is the command line I use:
java -Xmx1024M -jar forge-universal.jar nogui
The error I’m getting is below:
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
Please give me the solution for this issue.
The cause: You seem to be on Java 16. This Java version can’t run Forge 1.12.
Solution: You should consider to use :
👇️ Read more: “Java.lang.reflect.invocationtargetexception” – How to fix it?