Minecraft Forge 1.8 ClassCastException?

Ju
4

When starting Forge 1.8 (in Eclipse) I got the error "Unrecognized argument: -Xincgc" or something like that. I then removed that in the Run Configurations. Now comes this mistake

[21:31:19] [main / INFO] [GradleStart]: Extra: []
Exception in thread "main" java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders $ AppClassLoader can't 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.minecraftforge.gradle.GradleForgeHacks.searchCoremods (Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch (Unknown Source)
at GradleStart.main (Unknown Source)

(JavaSE-1.7, jdk13.0.1)

Re

JavaSE-1.7, jdk13.0.1

What does this mean? Why 1.7?

Since Java 8 is apparently still common on Minecraft and you will probably be overwhelmed with different configurations, I would recommend that you remove all JDKs except one 8 to get started.

This eliminates a source of error.

Before the question arises: you can get a JDK 8 at AdoptOpenJDK or as Amazon Corretto.

Ju

I've tried JDK 8 before. Then I looked at another tutorial that worked fine with JDK 7

Re

That doesn't make much sense. You run it on JDK 13, but also with the age-old 7? This mix only complicates everything, especially if you only seem to know your way around very superficially.

Ju

Sorry, was very confused, the JDK hadn't changed at all. At 7 it works now. It's only 1.8 Forge, that's why it still works.