VOOZH about

URL: https://minecraft.wiki/w/Tutorial:Update_Java

โ‡ฑ Tutorial:Update Java โ€“ Minecraft Wiki


Tutorial:Update Java

From Minecraft Wiki
Jump to navigation Jump to search
Script warning
 
The Minecraft Wiki is a website that can be edited by anyone. Although edits are usually checked by other wiki editors, it is possible for a malicious user to modify scripts and programs to behave maliciously. It is suggested that you should check the integrity of any script or program you run on your system.
This tutorial is exclusive to Java Edition.
 

As of Java Edition 26.1, the Minecraft Launcher is bundled with the Microsoft build of OpenJDK (Java SE 25). If need be, it is possible to change the used Java version in the profile options menu.

What is Java?

[edit | edit source]

Java is the programming language in which Minecraft: Java Edition is written. Java applications require and run inside Java Virtual Machines (JVM), which are supported across many different platforms. Because of this, developers can write a Java application and any platform that supports JVM can run the same Java application in their environment (write once, run anywhere). Notably, this makes the game supported on Windows, macOS, and Linux systems.

In order to run Minecraft: Java Edition, you would need the JVM software. It is typically bundled in Java Development Kit (JDK) or Java Runtime Environment (JRE). Both can be used to run the game, but JDK contains software and tools designed to develop Java applications, while JRE only contains the necessary parts to run one (excluding the development software and tools of JDK). This makes JDK a bit bigger than JRE, so if you aren't planning to do Java development anytime soon, you shouldn't need JDK.

As always, you should only use the latest version of Java supported by the game, which is Java 25 (as of 26.1). If you use custom JVM from an OpenJDK build, you should notice that Minecraft Launcher only allow the custom JVM with the same primary Java version as the minimum required Java version to launch the game.[1]

Why update?

[edit | edit source]

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.
  • 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.[7]
  • Older versions of Minecraft can run on newer Java, for example, Minecraft 1.16 can run on Java 17, Minecraft 1.18 can run on Java 20, and etc.
    • But this may cause some instability if not run with the right version of Java, especially versions that require Java โ‰ค8.
  • Running a Java Edition server requires your computer to have Java installed instead of the pre-installed Java from the Minecraft Launcher. See below on how to choose Java and installing them.

Choosing a Java

[edit | edit source]

As mentioned before, you can get JVM from Java Runtime Environment (JRE) or Java Development Kit (JDK). They are usually distributed by a third-party vendor as an OpenJDK build. OpenJDK is the official open source reference implementation of Java, meaning it contains the software and tools required to run Java applications, such as JVM. Unlike the name suggested, an OpenJDK build does not strictly provide JDK, depending on the vendor, they may provide JRE-only build of OpenJDK.

OpenJDK builds

[edit | edit source]

There are many third-party vendors that provide OpenJDK build which you can pick from:

  • Adoptium's Eclipse Temurin (successor of AdoptOpenJDK) โ€“ the most popular OpenJDK build. This is the best free open source OpenJDK build you can get out there, as it's well tested and it's sponsored by Microsoft and many other companies.
  • Azul's Zulu โ€“ stable and development builds provided by Azul.
  • Oracle's OpenJDK โ€“ stable and development builds provided by Oracle. It's technically the official builds, though packaged as ZIP archive without installer.
  • GraalVM โ€“ stable and development builds provided by Oracle. It uses high-performance compiler called Graal, though most of their advanced features and optimizations are only available in their enterprise and Oracle editions, which is paid and has restrictive license respectively. The Community edition is free and open source, but only few features are present. Do note the official website offers the Oracle edition, different from the Community edition on GitHub.

Long-term support (LTS)

[edit | edit source]

You will see that Java is divided into long-term support (LTS) and short-term support (STS) versions:

  • The LTS versions of Java are updated for a long time but at specific, often older versions of Java. This provides better stability for long term, but at the cost of newer/experimental features from Java being absent.
  • The STS versions provide the new features, but are provided update for short time and quickly get outdated. This can cause instability and vulnerability if not checked. If you are following the STS versions, it's recommended you follow a rolling-release model, that is, you must update Java frequently each time a new STS version is released.

These choices won't impact typical users, as the game will likely run fine with both versions, and you should just use the latest version that Minecraft currently support (see ยง What is Java?).

How to download

[edit | edit source]

This part of the tutorial will show you how to get Java for specific operating systems and update them after installing. For simplicity, we will show you how to download Adoptium's OpenJDK build, Temurin.

Verify if you have Java installed

[edit | edit source]

Before we install Java, you need to verify if you have Java installed on your system:

  • Open your system's terminal and run java -version to check your Java's version. If a version number is reported, and does not match the recommended version for Minecraft (see ยง Why update?), you should update Java from the tutorial below.
  • Alternatively for Windows, you can download Java Uninstall Tool. The software will check for your installed Java version, and removes older Java installation if necessary.

If you have older versions of Java installed before, you can remove it in your system's settings. Otherwise, you can install multiple Java or OpenJDK builds in your system, as recently installed Java will likely overwrite the previous version (in PATH variable, but for installation, they may exist coincide with each other).

Windows

[edit | edit source]

You can install Java by downloading the installer from the vendors' website, e.g. Adoptium's OpenJDK Temurin or Microsoft build of OpenJDK. After downloading, you can run the installer and install Java normally.

Winget

[edit | edit source]

Winget is the official Windows package manager for installing programs from Microsoft Store and the Winget repository. Its included in Windows 10 and Windows 11 by default.

You can install an OpenJDK build using Winget. You can choose either Temurin or Microsoft build of OpenJDK:

  • winget install EclipseAdoptium.Temurin.25.JRE for Adoptium Temurin 25 JRE-only.
  • winget install Microsoft.OpenJDK.25 for Microsoft build of OpenJDK 25.

Updating

[edit | edit source]

If you have installed Java from the vendors' website and want to update it after a long time, you can download the newer installer file and update the software that way.

If you have installed Java from Winget, you can update Java by running:

  • winget upgrade <java-package>, where <java-package> is the name of OpenJDK you have installed before.

macOS

[edit | edit source]

If you don't have OpenJDK, it can be installed using Homebrew package manager for macOS. Homebrew is a widely-used package manager for installing and updating software on macOS, including OpenJDK.

Homebrew is not installed by default on macOS, so you need to install it by running:

Then you can install OpenJDK by running:

  • brew install --cask temurin@25 for Adoptium Temurin 25.

Keep in mind starting from Temurin 21, older macOS versions than 10.11 might not be supported. You can still install other LTS versions, such as Java 17 and Java 11 from Temurin or other builds.

To update Java, you need to update Homebrew's package index and upgrade:

  • brew update && brew upgrade --cask temurin@25

Linux distributions

[edit | edit source]

Linux system comes in many different flavors called distribution (distro). Each distribution has different ways and configurations of installing software and maintaining them, so it's recommended you visit and read their documentation of doing so. In general, Linux is more favorable to open source programs, so it is recommended you use open source programs where applicable, such as OpenJDK.

Upgrading a single software is usually not recommended on Linux systems, so if you want to update Java, you may want to do full package upgrade on your system.

Ubuntu, Raspbian, Debian-based

[edit | edit source]

OpenJDK can be installed and updated by using apt:

  • Before installing, it is recommended to run sudo apt update.
  • sudo apt install openjdk-25-jdk for OpenJDK 25.
  • sudo apt install openjdk-8-jdk for OpenJDK 8.

Adding the -headless at the end of the package name will install headless Java and remove GUI components.

To update Java, it is recommended to run sudo apt update && sudo apt upgrade which will upgrade Java along other programs.

Fedora, AlmaLinux, Rocky Linux, CentOS, RHEL-based

[edit | edit source]

OpenJDK can be installed using dnf:

  • sudo dnf install java-25-openjdk for OpenJDK 25.
  • sudo dnf install java-1.8.0-openjdk for OpenJDK 8.

Adding the -headless at the end of the package name will install headless Java and remove GUI components.

To update Java, it is recommended to run sudo dnf upgrade which will upgrade Java along other programs.

openSUSE

[edit | edit source]

OpenJDK can be installed by using zypper:

  • sudo zypper install java-25-openjdk for OpenJDK 25.
  • sudo zypper install java-1_8_0-openjdk for OpenJDK 8.

For server usage, it is recommended to use openSUSE Leap rather than rolling-release Tumbleweed for stability.

To update Java, you can run the following commands depending on openSUSE editions:

  • sudo zypper update for openSUSE Leap, and
  • sudo zypper dup for openSUSE Tumbleweed.

Arch Linux

[edit | edit source]

OpenJDK distributions are available on Arch Linux repository, and can be installed by using pacman:

  • pacman -S jre25-openjdk for OpenJDK 25.
  • pacman -S jre8-openjdk for OpenJDK 8.

Adding the -headless at the end of the package name will install headless Java and remove GUI components.

To update Java, it is recommended do a full update and upgrade of the packages in your system:

  • pacman -Syu to update Java along other packages.

If you encounter issues, it is recommended that you refer to the official Arch Linux Wiki.

Gentoo

[edit | edit source]

Run emerge --ask virtual/jdk which installs OpenJDK according to your profile.

To update Java or specific versions, please refer to Gentoo Wiki.

Other distributions

[edit | edit source]

Check your distro's documentation. It should have information on how to install OpenJDK.

Alternatively, you can visit Java's website directly to download the Java package for Linux. Most distros work with this (either 32 or 64-bit), but not usually recommended as your distro's package manager is more stable.

FreeBSD

[edit | edit source]

OpenJDK can be installed in FreeBSD using pkg:[9]

  • pkg install openjdk25 for OpenJDK 25.
  • pkg install openjdk8-jre for OpenJDK 8 JRE-only.

Once you have installed OpenJDK, you may see OpenJDK requires fdescfs and procfs. In order to satistfy this requirements, you can run the following commands:

  • mount -t fdescfs fdesc /dev/fd for fdescfs mounted on /dev/fd.
  • mount -t procfs proc /proc for procfs mounted on /proc.

This changes are not permanent on the next system reboot. In order to make them permanent, you need to add these mountpoints to your /etc/fstab file. Open them with your text editor (such as nano or vi) and insert the following lines into /etc/fstab:

# device-spec mount-point fs-type options dump
fdesc /dev/fd fdescfs rw	 0	0
proc /proc procfs rw	 0	0

Lastly, you will want to rehash to be sure that you can use your new Java binaries immediately, run rehash in the command line.

For installing OpenJDK using ports instead, please visit this website for more information. Packages from pkg are compiled binaries of the ports.[10]

Notes

[edit | edit source]
  • Because the official launcher has Java integrated, you won't need to download and install Java unless you are using third-party launchers instead.
  • If your computer runs a 64-bit operating system, it's recommended to install the 64-bit Java for better performance.
  • Administrator privileges are required when installing on some systems.

Legacy versions

[edit | edit source]
  • The licensing change in January 2019 (8u211) is partially why the Minecraft Launcher (since Java Edition 1.16.5) is stuck at Java 8u51, instead of a newer Java 8 update. This problem has since been resolved with newer Java versions.
  • Java 9 to Java 16 (except Java 11) are no longer supported by Oracle: they no longer receive public security updates,[11] and are to be regarded as insecure. Oracle has removed them from its download page but the builds are still available in the Java Archive. Oracle does not recommend using builds from the Java Archive.[12]
    • Java 13, 15 is supported by source code, provides support in Azul Zulu.

Issues

[edit | edit source]

Known issues

[edit | edit source]
  • In Java 11 or newer, a very rare crash may occur in world generation code (MC-149777). A Fabric mod called Voyager exists to fix this issue.[7] 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+.[13]
  • 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.[7]

Other issues

[edit | edit source]

Issues relating to "Java lang", "Java server", "GC", "Lwjgl", "JVM", or "Exception" are maintained on the bug tracker. Issues should be reported and viewed there.

References

[edit | edit source]
  1. โ†‘ MCL-18306
  2. โ†‘ "Heads up modders: This snapshot is the first Minecraft version to require (and therefore use) Java 8. You can now finally use 7/8 features!" โ€“ @Dinnerbone (Nathan Adams) on X (formerly Twitter), January 30, 2017
  3. โ†‘ "Minecraft Snapshot 21w19a" โ€“ Minecraft.net, May 12, 2021.
  4. โ†‘ "Minecraft 1.18 Pre-Release 2" โ€“ Minecraft.net, November 16, 2021.
  5. โ†‘ "Minecraft Snapshot 24w14a" โ€“ Minecraft.net, April 3, 2024.
  6. โ†‘ "Minecraft 26.1 Snapshot 1" โ€“ Minecraft.net, December 16, 2025.
  7. โ†‘ a b c jellysquid3's Java Update / ZGC Guide
  8. โ†‘ https://brew.sh/
  9. โ†‘ https://www.digitalocean.com/community/tutorials/how-to-install-java-on-freebsd-10-1
  10. โ†‘ https://www.freshports.org/faq.php#port
  11. โ†‘ "Oracle Java SE Support Roadmap" โ€“ oracle.com.
  12. โ†‘ "Java Archive" โ€“ oracle.com.
  13. โ†‘ Fix MC-149777 - java.util.ConcurrentModificationException when using Java 11 or above

Navigation

[edit | edit source]
Retrieved from "https://minecraft.wiki/w/Tutorial:Update_Java?oldid=3564577"

Navigation menu