Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Conman655

Modded server "cast to class" issue

Recommended Posts

Posted · Original PosterOP

Can't figure out how to fix it, ideas? Just downloaded a server install from here. (Im on linux)

 

Also, is this even the right place to post this?

 

Logs:

wowitsaserver@wowItsAServer:~/Desktop/ModdedServer$ java -Xms3024M -Xmx3048M -jar Forge.jar 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:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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

Link to post
Share on other sites
27 minutes ago, Conman655 said:

changed to 1.8.0_241, had no effect

Are you sure you are using the right java executable? Works fine on my machine using java 8.

 

Java 9 (open jdk 9)

PS C:\Users\\Downloads\java-se-9-ri\jdk-9\bin> .\java.exe -jar ..\..\..\tcp\Forge.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:62)
        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: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
        at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        ... 6 more

 

Using Java 1.8.0_241:

PS C:\Users\\Downloads\java-se-9-ri\jdk-9\bin> java.exe -jar ..\..\..\tcp\Forge.jar  
[00:00:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker
[00:00:11] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker
[00:00:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLServerTweaker
[00:00:11] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2816 for Minecraft 1.12.2 loading
[00:00:11] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_241, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_241
[00:00:11] [main/INFO] [FML]: Searching C:\Users\\Downloads\java-se-9-ri\jdk-9\bin\.\mods for mods
[00:00:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[00:00:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

 

Link to post
Share on other sites
Posted · Original PosterOP

Thanks for your help, turns out that Linux just hates forge or something. Switched to Windows and it worked beautifully. (Was a VM so not a big deal)

 

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×