Back to blog

UnsupportedClassVersionError: diagnose it and install Java 25 for your Minecraft server

October 26, 2026
7 min
Admin

Does your Minecraft server stop within a second with a message starting with java.lang.UnsupportedClassVersionError? Don't panic: it's not your world or your configuration, it's a mismatch between the Java version launching the server and the one the program was compiled for. This guide shows you how to read the error, find the Java actually being used and install Java 25 cleanly, whatever your setup.

Read the error message in 30 seconds

Here is the typical form of the error when starting a recent server:

Error: LinkageError occurred while loading main class net.minecraft.bundler.Main
    java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main 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 65.0

Three pieces of information are enough for a diagnosis:

  • The class mentioned (here net/minecraft/bundler/Main): it tells you what is too recent. A class under net/minecraft, io/papermc or org/bukkit points to the server itself. Any other package name usually points to a plugin or a mod.
  • The first number ("compiled by… class file version 69.0"): the required Java version.
  • The second number ("recognizes class file versions up to 65.0"): the Java version currently in use.

Class file version to Java mapping

Each Java release produces a specific class file version number. These are the ones you will meet on Minecraft servers:

Class file versionJava version
52Java 8
55Java 11
60Java 16
61Java 17
65Java 21
69Java 25

In the example above, the server requires Java 25 (69) but runs on Java 21 (65). The rule is simple: you need a Java at least as recent as the first number. A newer Java than required usually works just fine.

Which Java version for which Minecraft version?

These are the minimum versions required by the Minecraft Java Edition server, valid for Vanilla, Spigot, Paper and Purpur:

  • 1.17: Java 16;
  • 1.18 to 1.20.4: Java 17;
  • 1.20.5 to 1.21.11: Java 21;
  • 26.1 and later: Java 25.

Java 25 is an LTS (long-term support) release: installing it covers both 26.x servers and older versions that needed Java 17 or 21.

The three situations that trigger the error

1. The server is too recent for your Java

This is the most common case since the 26.x versions arrived: the server jar was updated, but Java stayed on 21. The class mentioned belongs to the server and the first number is 69. Fix: install Java 25 and launch the server with it.

2. A plugin or mod is too recent

Your server starts, but the console shows the error while loading a plugin, with a class name that doesn't look like Minecraft. The plugin was compiled for a newer Java than the server's. Two options: move the server to Java 25 (safe for a 1.21 server, which also runs on Java 25), or install an older build of the plugin compiled for your Java.

3. The reverse message: "Unsupported class file major version 69"

This variant is misleading. It doesn't come from Java itself but from a tool that reads classes (a bytecode library used by some mod loaders or older plugins). It means that tool is too old to understand Java 25 classes. Installing Java 25 won't help here: update the mod loader or plugin involved, or go back to the Java version intended for your Minecraft version.

Find the Java actually being used

A classic trap: java -version shows 25, but the server still crashes. That means your start script doesn't use the same Java as your terminal. Check on Linux:

# Default Java version
java -version

# Binary actually called by the java command
readlink -f "$(command -v java)"

# All installed versions (Debian / Ubuntu)
update-alternatives --list java

# Variable sometimes used by scripts
echo "$JAVA_HOME"

Then open your start script (start.sh, systemd unit, screen or tmux setup) and look at the launch line. If it starts with a full path such as /usr/lib/jvm/java-21-…/bin/java, that Java is the one being used, whatever the system default is.

On Windows, open a command prompt and type:

where java
java -version

If where java returns several paths, the first one wins. An old Java installed before the new one can therefore take precedence in the PATH variable.

Install Java 25 for your environment

Several free, well-established OpenJDK distributions exist: Eclipse Temurin (Adoptium project), Amazon Corretto, Microsoft Build of OpenJDK… They are equivalent for a Minecraft server. The examples below use Temurin.

Debian and Ubuntu

The temurin-25-jdk package is distributed through Adoptium's official APT repository. First add this repository by following the Linux page of the Adoptium installation documentation (import the GPG key, then create the /etc/apt/sources.list.d/adoptium.list file), then install Java 25:

sudo apt update
sudo apt install -y temurin-25-jdk

Then select Java 25 as the default if several versions coexist:

sudo update-alternatives --config java
java -version

Fedora, RHEL and derivatives

Once the Adoptium repository is declared in /etc/yum.repos.d/ (see the same documentation), installation is a one-liner:

sudo dnf install temurin-25-jdk

Windows

The easiest way is the winget package manager, built into Windows 10 and 11. In a terminal opened as administrator:

winget install EclipseAdoptium.Temurin.25.JDK

Close and reopen the terminal, then check with java -version. You can also download the MSI installer from the Adoptium website: make sure to tick the option that updates the PATH variable.

macOS

With Homebrew:

brew install openjdk@25

At the end of the installation, Homebrew prints the command needed to make this Java visible to the system: run it, then check with java -version.

Docker

If your server runs in a container, the image sets the Java version, not the host machine. Base your image on a version 25 image, for example eclipse-temurin:25-jre, or, if you use a ready-made Minecraft image, pick its Java 25 tag. Rebuild and recreate the container: a simple restart keeps the old image.

On a hosting panel

On a hosted server with a panel, you don't install anything yourself: the Java version depends on the "image" or "runtime" selected in the server's startup settings. Select the Java 25 image, save, then fully restart the server (stop, then start). If no Java 25 image is offered for your server type, open a ticket with your host rather than hacking the startup line.

Launch the server with the right Java, for good

Once Java 25 is installed, make your launch independent from the system default, which can change during a package update. Call Java by its full path in your script:

#!/bin/sh
# start.sh: adjust the path to your installation
JAVA=/usr/lib/jvm/temurin-25-jdk-amd64/bin/java
"$JAVA" -version
"$JAVA" -Xms4G -Xmx4G -jar server.jar --nogui

The "$JAVA" -version line prints the Java version at the top of the console: next time something crashes, you'll know immediately which Java was involved. To find the exact path, use the update-alternatives --list java command shown above.

If your server is managed by systemd, update the unit's ExecStart line with the same full path, then reload the configuration:

sudo systemctl daemon-reload
sudo systemctl restart minecraft

Several servers, several Java versions

Keeping an old 1.16 server next to a 26.x one? No problem: several Java versions can be installed side by side. Give each server its own Java path in its start script, and don't change the system default at random. For very old versions (1.12 and earlier), stay on Java 8: some refuse to start on a recent Java.

Quick troubleshooting checklist

  1. Note the two class file version numbers and the class mentioned in the error.
  2. Convert them with the table: required version and version in use.
  3. Identify the culprit: the server itself, a plugin or a mod.
  4. Check the Java actually called by the start script, not just the one in your terminal.
  5. Install Java 25 if needed, then point the script, systemd unit, Docker image or panel image to it.
  6. Fully restart and read the console: the Java version line should show 25.

FAQ

Should I install the JDK or the JRE?

The JRE is enough to run a server. The JDK adds development tools and is needed, for example, to build Spigot with BuildTools. When in doubt, the JDK covers every use.

Does Java 25 run a 1.21 server?

Yes. A Java newer than the required minimum generally works without trouble, so you can install Java 25 before even changing your Minecraft version.

Do players need to install Java 25?

No. The official Minecraft launcher automatically provides the right Java version for the game. The issue only affects servers and third-party launchers set to a fixed Java.

The error persists after installing Java 25: what now?

Nine times out of ten, the start script still points to the old Java. Add the -version line described above to check. If the console does show Java 25 and the error mentions "major version 69", it's case 3: a plugin or mod loader that needs updating.

Share this article

Back to blog

Ready to launch your server?

Discover our high-performance Minecraft hosting offers.

View offers