Java 25 for Minecraft Servers

Minecraft servers from 26.1 to 26.3 require Java 25 or newer (class file version 69), according to Mojang's version data. Eclipse Temurin 25 is a free, widely used build.

Minecraft versions that need Java 25

According to Mojang's version data, these Minecraft releases require Java 25 as the minimum (newer Java versions also work for vanilla and Paper-family servers):

26.3, 26.2, 26.1.2, 26.1.1, 26.1

Snapshots and pre-releases of these versions have the same requirement. Full table: Minecraft → Java versions.

Install Java 25 (Eclipse Temurin)

Temurin is a free OpenJDK build from the Eclipse Adoptium project. Download installers from adoptium.net — Temurin 25 , or use a package manager:

REM Windows (winget)
winget install EclipseAdoptium.Temurin.25.JDK

# macOS (Homebrew)
brew install --cask temurin@25

# Debian/Ubuntu — after adding the Adoptium apt repository (see below)
sudo apt install temurin-25-jdk

Adding the Adoptium apt repository (from Adoptium's installation docs):

sudo apt install -y wget apt-transport-https gpg
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt update
sudo apt install temurin-25-jdk

A server only needs the runtime, so temurin-25-jre also works (its folder is then temurin-25-jre-amd64); the commands here use the JDK for consistency. Other distributions (dnf, zypper, apk): see Adoptium's Linux instructions.

Check it and use it for your server

Open a new terminal and run java -version. For Java 25 the first line starts with openjdk version "25.. If another version appears, your PATH points to a different Java — call the right one by full path in your start script:

REM Windows: see dir "C:\Program Files\Eclipse Adoptium" for the exact folder
"C:\Program Files\Eclipse Adoptium\jdk-25…-hotspot\bin\java.exe" -Xms4G -Xmx4G -jar server.jar nogui

# macOS
"$(/usr/libexec/java_home -v 25)/bin/java" -Xms4G -Xmx4G -jar server.jar nogui

# Linux (Adoptium packages; check: ls /usr/lib/jvm)
/usr/lib/jvm/temurin-25-jdk-amd64/bin/java -Xms4G -Xmx4G -jar server.jar nogui

On Debian/Ubuntu you can instead switch the system default with sudo update-alternatives --config java. The start script generator writes a script that checks the Java version first.

Error message for Java 25 jars

A server jar that needs Java 25, started with an older Java, fails with UnsupportedClassVersionError mentioning class file version 69.0:

… has been compiled by a more recent version of the Java Runtime (class file version 69.0), this version of the Java Runtime only recognizes class file versions up to …

Install Java 25 as above and make sure the start script uses it. Walkthrough: fix UnsupportedClassVersionError.