Java 8 will not function only with 1.12.2 servers?

OS Name/Version: Ubuntu 22.04.1 LTS

Product Name/Version:

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
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(
at java.base/java.lang.reflect.Method.invoke(
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class (jdk.internal.loader.ClassLoaders$AppClassLoader and are in module java.base of loader 'bootstrap')
at net.minecraft.launchwrapper.Launch.<init>(
at net.minecraft.launchwrapper.Launch.main(
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(
... 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 -

Did you already try to reselect Java 8?

Yeah I have tried swapping but to no avail

Try running with the TEMURIN 8 that is the Adoptium versions AMP now installs by default. That one is working on my current 1.12.2 Planetary pack.

Also check the Support tab for that instance and the Last Executable line make sure it shows the Java 8 you have selected.

1 Like

Ahh ha that’s pointed me in the right direction, seems it’s still selecting Java 18,
Thanks for the pointer, annoying me how easy that was to see and yet I didn’t.

Will try doing it manually then and see how it goes, just not entirely sure how to do this via AMP

That Java dropdown is the right place just try using the TEMURIN 8 instead. once you click anywhere else it will show it saved the settings. Make sure the game is stopped or the instance will not pick up the new java settings.

1 Like