First Server Issues "A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException"

CraftValkyrie

New Member
Sep 18, 2021
0
0
1
Hey Guys and Gals, I am new here and new to Minecraft Java. Excuse me if this may be a simple solution for some but I am not a coder, I know bare minimum for coding and am decent with CMD prompt and pc's in general.

I am not trying to run some elaborate server, I just want to be able to play my first stoneblock world with 1, maybe two friends. I have gone through many steps to get here and I can not seem to get past this error. This has happened to my stoneblock, stoneblock2 and skyblock3 server attempts... I can run a vanilla server just fine but the mod ones will not.

I am assuming it is something with the libraries or the config files?

Here is the cmd log return

\FTB Presents Stoneblock 2\Server>Java -jar forge-1.12.2-14.23.5.2847-universal.jar
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:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
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



Thank you in advance for any help! Please be kind to my newness and lack of knowledge.
 

Dr.Brownie

New Member
Sep 19, 2021
0
0
1
I had the exact same issue! What you need to do is go into control panel and go into uninstall program and uninstall the development kit and only keep the java x64 bit version 8 or 11. Otherwise the issue will continue to repeat, I just fixed it and had the same error at the same time as you.
 

nocaps

New Member
Oct 13, 2021
0
0
1
@Dr.Brownie Hey I have this same issue and I tried the fix you suggested. While I did have about 3 other JDK versions, I uninstalled those and kept the 64 bit version of JDK 8. I am still getting the same issue when trying to open the server. If you have any other suggestions it would be appreciated greatly.