Jump to content

I cannot get my forge server to work with a .bat file


Recommended Posts

whenever I use the bat file to start the forge server I get the following error. I am brand new to this so a detailed step-by-step would be appreciated. the bat file works with the vanilla version of the server all I do is switch the name in the bat file.

C:\Users\devin\Desktop\1.7.10>java -Xmx8G -Xms5G -jar forge-1.7.10- nogui
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 cpw.mods.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:43)
        at cpw.mods.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:12)
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

Press any key to continue . . .

Link to comment
Share on other sites

the server is for 1.7.10 when I compare the bat file of a forge 1.18.1 it has this line java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.1-39.0.79/win_args.txt %* and works fine. the 1.7.10 works if I use the server.jar instead of a bat file

Edited by devinsmalk
Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.