Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
847 views
in Technique[技术] by (71.8m points)

Minecraft forge 1.12.2 Server wont start

C:UsersExcedDesktopEternal (ServerPack 1.3.7)>java -Xms4G -Xmx6G -XX:PermSize=256m -Dfml.read.Timeout=560 -jar forge-1.12.2-14.23.5.2847-universal.jar nogui
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option PermSize; support was removed in 8.0
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

C:UsersMegaportDesktopEternal (ServerPack 1.3.7)>pause
Premere un tasto per continuare . . . 

I read more post about this problem, but I saw forge server wont start with a java version above 8.

But I already have java 8 64 bit. Also this is the code inside the bat file

java -Xms4G -Xmx5G -XX:PermSize=256m -Dfml.read.Timeout=560 -jar forge-1.12.2-14.23.5.2847-universal.jar nogui pause

Also i tried with jarfix but doesn't work neither.

question from:https://stackoverflow.com/questions/65925606/minecraft-forge-1-12-2-server-wont-start

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is a very simple problem to fix. You're using the wrong file. Navigate to here to download the Forge 1.12.2 installer. Then run the file(don't worry; it's completely safe), and select Install Server. Then change the install directory to a new folder. When it's done installing, run minecraftserver1.12.2.jar, wait for it to crash, then enter the eula.txt, and change false to true. Save and close the file, then re-open minecraftserver1.12.2.jar. Then run the Forge file to run the modded server. For any other questions, please ask.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...