OS Name/Version: Ubuntu 22.04.1 LTS
Product Name/Version: 2.4.0.10
Problem Description: I have found that my servers running forge 1.16.5 using Java 8 (Open JDK) work perfectly fine however if i try to run any forge 1.12.2 versions i get the
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:110)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:62)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:31)
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)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
... 3 more
Which as I understand is the generic “I have the wrong java” error. But I dont understand why this is occurring when it evidently works elsewhere.
I have tried to install forge 1.12.2 manually, i have tried different releases but all give the same error when installed.
To prove java is on the system -