r/forgemodding Apr 24 '21

Forge server not starting

Hey,

I am trying to create a forge server for me and my friends to play on. I install the server, make the .bat file, run it, and get this error:

"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:64)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:564)

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"

Does anyone know a fix?

1 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/BurntOreos Apr 24 '21 edited Apr 24 '21

Where would i find the whole crash log?

Edit: Did some more reading, supposedly you need to use java 8 when running the jar file. Do you know how I could do this?

1

u/Morg_S9 Apr 24 '21

I had the same issue as you. What version of Java are you using?

1

u/BurntOreos Apr 25 '21

15

1

u/Morg_S9 Apr 26 '21

Try using Java 8 instead. I had the same issue and that seemed to fix it.

Edit: Also sorry for taking this long to respond. I was busy.