If you want to know how to update Java for Minecraft, the practical answer is that the Minecraft Launcher usually does it for you. As of Java Edition 26.1 the launcher is bundled with the Microsoft build of OpenJDK (Java SE 25), so a normal launch needs no separate Java. You only install Java yourself for a dedicated server or a standalone setup program. This applies to Java Edition only, and Bedrock does not use it.
Which Java version Minecraft needs
Each release line has a minimum Java. Since 26.1 (26.1 Snapshot 1), Minecraft requires Java 25 or newer. Earlier lines need less:
- 1.20.5 (24w14a) to 1.21.11 needs Java 21 or newer.
- 1.18 (Pre-release 2) to 1.20.4 needs Java 17 or newer.
- 1.17 (21w19a) to 1.17.1 needs Java 16 or newer.
- 1.12 (17w13a) to 1.16.5 needs Java 8 or newer.
- 1.6.1 (13w16a) to 1.11.2 needs Java 6 or newer, and everything before that needs Java 5 or newer.
Older releases can run on newer Java. Minecraft 1.16 runs on Java 17, for example. The trade-off is possible instability when the Java does not match, especially for releases that need Java 8 or lower.
How the Minecraft Launcher bundles its own Java
The launcher is bundled with the Microsoft build of OpenJDK, the official and tested OpenJDK build for Minecraft, available for free and commercial purposes.
If you point the launcher at a custom JVM from an OpenJDK build, it only allows one whose primary Java version matches the minimum required to launch that release.
When you need to install a separate JDK
A separately installed Java matters when something runs outside the launcher's bundled runtime:
- Running a Java Edition server. It needs Java installed on the machine, not the launcher's copy.
You do not need a full JDK just to play. A JDK contains development tools and is a bit bigger than a JRE, so skip it unless you plan to develop in Java. For vendors, Adoptium's Eclipse Temurin is described as the most popular OpenJDK build and is sponsored by Microsoft and other companies. Azul's Zulu and Oracle's OpenJDK also exist. Oracle JDK requires an Oracle Technology Network (OTN) license for Java 11-16 and Non-Fee Terms and Conditions (NFTC) for Java 17 and above, and is not recommended unless you accept those restrictive terms.
How to check your Java version
On Windows, press `Windows`+`R`, type `cmd.exe` and press Enter. On other systems, open your terminal. Then run:
`java -version`
If a version number appears and it is lower than Java 25, update it for any tool that uses your system Java. If the command fails, continue with the install steps below.
Installing Java 25 on Windows
- 1.Get Java 25 from Adoptium and choose the `Windows Installer (.msi)` file. Pick `x64` for a 64-bit system or `x86` for a 32-bit one. If you are unsure, try 64-bit.
- 2.Run it. When the features page appears, set `Set JAVA_HOME environment variable` and `JavaSoft (Oracle) registry keys` to "Entire feature will be installed on local hard drive".
- 3.Finish the setup, then restart your computer. Windows will not always tell other programs that Java is installed until you do.
- 4.Open the command prompt again and run `java -version` to confirm Java 25 shows up.
Installing a newer Java will likely overwrite the older one in your `PATH` variable, though older installations may stay on disk. You can remove old ones in your system settings.
How to switch the Java version in a launcher
In the Minecraft Launcher, the Java used can be changed in the profile options menu. Keep the launcher's rule in mind, since a custom JVM must share the primary Java version of the minimum the release requires.
Fixing Java version errors
- The command reports a version lower than 25 while you use a tool that needs Java 25. Install Java 25 and restart, as described above.
- An old release running on newer Java may become unstable, especially one that needs Java 8 or lower. Check the release lines in the list above.
- A custom JVM is refused by the launcher. Use one whose primary Java version equals the minimum for that release.
- Still crashing. Work through Fix Minecraft Exit Code 1 Crashes or the beginner troubleshooting checklist.
If you want more memory for the game rather than a new Java, see how to allocate more RAM. To update the game itself, use how to update Minecraft on Java and Bedrock.
Frequently asked questions
Do I need to install Java to play Minecraft?
Not for normal play. As of Java Edition 26.1 the Minecraft Launcher is bundled with the Microsoft build of OpenJDK (Java SE 25). You need a separate Java only for things outside the launcher, such as running a Java Edition server.
What Java version does Minecraft 26.1 need?
Minecraft requires Java 25 or newer since 26.1, starting with 26.1 Snapshot 1. The launcher's bundled runtime is Java SE 25. If you use your own Java for a server or setup tool, `java -version` should report 25 or higher.
Which Java does Minecraft 1.21 use?
From 1.20.5 (24w14a) through 1.21.11, Minecraft requires Java 21 or newer. Releases from 1.18 to 1.20.4 need Java 17 or newer. Running an older release on newer Java can work, but it may become unstable, especially for releases that need Java 8 or lower.
Should I install a JDK or a JRE for Minecraft?
Either can run the game. A JDK adds development tools and is a bit bigger, so a JRE is enough if you will not develop in Java. For a vendor, Adoptium's Eclipse Temurin is the most popular OpenJDK build.
How do I check which Java Minecraft is using?
Running `java -version` in a terminal reports the Java version on your system. To change the Java a launcher profile uses, open the profile options menu in the Minecraft Launcher.
