PSA: Use Java 8 (Not 9 or 10).

Currently Java 8 is the only supported version for launching the game.

Mojang's launchwrapper fails when using any version higher than Java 8. In addition, Forge itself does not support the latest versions. Expect this to be the case until 1.13 or later.

If you see the following error, you need to downgrade back to Java 8.

Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/
    at net.minecraft.launchwrapper.Launch.<init>(
    at net.minecraft.launchwrapper.Launch.main(
The above issue originates in the Mojang LaunchWrapper, however it masks a larger error. Forge does not support Java 9 and there is no roadmap for when it will. For the forseeable future you will need Java 8 to connect to the server.

The following pull request would fix the issue with launchwrapper:
Last edited: