Java to use with Minecraft Java editions


If you have come here looking for how to open JAR files for Mod Installers like OptiFine, Iris Shaders, Forge & Fabric, then scroll to the bottom of this article.

With the release of the new Minecraft Launcher, you may want to start defining the Java Executable which the game uses to launch with. This can be done in the launcher itself.

Download Links are at the bottom

For defining a Java version for your installations, do the following:-

In the installations section click the 3 dots after highlighting an installation.

Click on More Options.

Click on Browse and navigate to the JAVAW.exe file in the program files directory. The JAWAW.exe file is usually found inside the 'bin' folder.

Click on 'Save' and then launch by clicking on 'Play'

Do this for each installation you create in the default Minecraft Launcher.

Get the files from here:-
This method also works with Custom Launchers like CurseForge, GDLauncher, MultiMC. Simply install the Java JDK files from above links, and in the settings menu of the launchers, navigate to the JAVAW.exe file in the program files directory.

To open mod loaders or shader installers like Forge, OptiFine, Iris Shaders & Fabric, use the Adoptium or Zulu OpenJDK installer from the links above. After installing restart your computer,. You will then be able to open JAR files.