Tutorials/Update Java

As of Minecraft Java Edition 1.18, the Minecraft launcher is bundled with the Microsoft Build of OpenJDK (Java version 17.0.3). If need be, it is possible to change the used Java version in the profile options menu.

What is Java?
Java is a programming language and computing platform. Unlike many other languages, Java does not run directly on the hardware, but in a virtual machine, called the JVM (Java Virtual Machine). Minecraft (Java Edition) is written in Java, and uses it for game logic, rendering, and networking.

As of May 12, 2023, the latest stable Java versions are 1.8.0_372 (OpenJDK) (Long-Term Support or LTS), 11.0.19 (LTS), 17.0.7 (LTS) and 20.0.1 (Short-Term Support or STS).

If you use a custom JVM, you should notice that the official launcher only allow the custom JVM with the same primary Java version as the minimum required Java version to launch the game.

Why update?
The latest versions of Java contain important enhancements to help improve performance, stability and security of the Java applications that run on your machine. Installing the latest Java update ensures that Minecraft continues to run safely and efficiently.
 * Different Minecraft versions have different requirements of minimum Java version.


 * From Java Edition 1.12(17w13a) to Java Edition 1.16.5(1.17: 21w18a), Minecraft requires Java 8 (1.8.0) or newer.
 * From Java Edition 1.17(21w19a) to Java Edition 1.17.1(1.18: 1.18 Pre-release 1), Minecraft requires Java 16 or newer.
 * Since Java Edition 1.18(1.18 Pre-release 2), Minecraft requires Java 17 or newer.
 * Minecraft may sometimes crash without being run by a relatively modern version of Java.
 * Java updates fix lots of problems and bugs and typically cause increases in performance.
 * For example, the newer garbage collectors can help with lag spikes during high memory usage.
 * Running a server requires your computer to have Java installed instead of the pre-installed Java. See Tutorials/Setting up a server for more information.

Where to download
You can get Java either from Oracle or from someone who builds OpenJDK. For the purpose of Minecraft they are essentially the same, but Oracle's "OTN" version (Oracle JDK uses "Oracle No-Fee Terms and Conditions" as of Java 17 LTS) requires a PAID license for commercial and production purposes. If you make money from streaming Minecraft or running a Minecraft server (even non-profit), you MUST use OpenJDK unless you want to figure out how to pay.


 * [https://microsoft.net/openjdk Microsoft Build of OpenJDK (the officially tested OpenJDK build for Minecraft)
 * Adoptium OpenJDK (Continuation of AdoptOpenJDK)(stable builds only, check github.com/adoptium for development builds - Microsoft also sponsors Adoptium so you can assume this is also well tested)
 * Zulu OpenJDK (stable and development builds)
 * Oracle OpenJDK (stable and development builds) - zip packages only (no installer)
 * Oracle JRE (NOT recommended unless you want to pay) (stable "OTN" builds)

You will see that Java is divided into LTS (long-term support) like 11 and STS (short-term support) version numbers like 16. An LTS version will be given updates for longer, so people tend to use them as a stable standard of "modern, but not too new" Java.

Other VMs
Some other Java compatible VMs include:


 * IBM's Semeru, optimized for low memory and fast startup
 * Oracle's GraalVM, also optimized for low memory and fast startup

How to update
When you install Java, go to your launcher, edit or create an installation, and in the Java Executable box, type  (Windows) or:  (Linux) or:   (macOS). The exact value depends on where your java is installed.

You must remove  from your JVM Arguments. This option is meaningless for Java 9 and newer, and will cause a launch failure if you keep it there.

Known issues

 * In Java 11 or newer, a very rare crash may occur in world generation code . A fabric mod called Voyager exists to fix this issue. If you are using fabric API 0.26.2 or above, this mod is not needed as the fix is included. This bug was fixed in 1.17 snapshot 21w20a and hence does not exist from 1.17+.
 * Do not upgrade if you are using Intel HD2xxx/3xxx graphics on Windows 10, as the driver is bugged. Java 8 uses a slower rendering method that makes it work, and that is mainly why Mojang stuck to this old version.