Please use Java 8!

As of right now, our mods are written in Java 8 and for Java 8. You can try to use Java 11+, but there are some integral functions used in Java 8 that have been removed or refactored in Java 11+.

Why don’t we develop with Java 11?

Minecraft’s target Java version is Java 8 Update 51. To compensate, most of us develop our Forge mods with Java 8 so as to not disadvantage the folks who are still back in Java 8. Unfortunately, this means that Java 11+ users are going to have a hard time using Forge/Fabric mods, and there’s not much we can really do about that at the current moment.

Where can you get Java 8?

Minecraft Launcher

Minecraft Launcher comes bundled with Oracle Java 8 Update 51, which is automatically used whenever you launch the game or make a new profile in Minecraft Launcher. If you want to use a more up-to-date version of Java, read the following header below.

MultiMC and Other Launchers

There are several places where you can get Java 8 or an OpenJDK fork of Java 8. I (Jonathing) recommend Amazon Corretto, as it is constantly updated with new bugfixes and is maintained by Amazon AWS and is one of the most common OpenJDKs out there. If you want to use vanilla Java by Oracle, you will need to make an Oracle account to be able to download it. Here is a list of Java JDKs/JREs including Oracle’s Java and some common OpenJDK distributions.