Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Problem creating a forge server

  • 584 Views
  • Last Post 10 December 2021
KeithIsHere posted this 10 December 2021

Hey guys, trying to get a modded server running here. Using minecraft version 1.12.2 I did download 1.12.2 official as well as forge 1.12.2, i also set the server jar as forge-1.12.2 but i get this error when trying to start the server...

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.(Launch.java:34) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Order By: Standard | Newest | Votes
fafdk posted this 10 December 2021

Looks like that you need to try another Java version? Which version are you using?

KeithIsHere posted this 10 December 2021

Are you talking about the Java version running on the machine that I have AMP running on? It is a linux machine running ubuntu linux server, im pretty sure i have the latest version of java installed on it.

Mike posted this 10 December 2021

Check for sure - what version is selected in AMP itself? Also older versions of Forge may need to use an older version of Java - often Java 8.

KeithIsHere posted this 10 December 2021

I have 2 servers running that are 1.18 and need the latest version of JAVA, if i install Java 8 onto the linux machine as well, will it mess with the newer instances too?

AbhorrentJoel posted this 10 December 2021

I have 2 servers running that are 1.18 and need the latest version of JAVA, if i install Java 8 onto the linux machine as well, will it mess with the newer instances too?

No, it should not. Even if, for whatever reason, the default version of Java for the whole system changes, it can be easily updated via the system's terminal.

I know you have not mentioned using Docker, so I have been assuming you are not using it. However, if you are using it, I believe the default ampbase:java image does contain Java 8.

Close