Skip to content
tricknfixGAMING · TECHNOLOGIE · INFORMATIQUE
Create

Translation of the initial post. Replies remain in their original language. Read the original

#minecraft·Open questionPCTutorial

Minecraft Java server won't start (UnsupportedClassVersionError): Java 25 required

Tutorial

You updated your Minecraft: Java Edition server to version 26.1 or later (26.3 was released on September 15, 2026), and it stops right at launch with an UnsupportedClassVersionError? Since version 26.1, Mojang states that the game requires Java 25. The official launcher provides its own Java, but a server you start yourself uses the Java installed on the PC. If that is Java 21 or older, the server cannot start. This guide explains how to check and fix this without losing your world.

Problem

  • The server window closes immediately, or the console shows an error at startup.
  • The message contains "UnsupportedClassVersionError" and a sentence such as "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".
  • The problem appeared right after moving the server to Minecraft Java 26.1 or a later version.
  • The game itself launches normally from the official launcher.

What to know before you start

  • The official change: in the Minecraft Java Edition 26.1 notes (March 24, 2026), Mojang writes: "The game now requires Java 25". The Java distribution included with the game is now the Microsoft Build of OpenJDK 25.
  • How to read the error message: according to Oracle's Java specification, class file format version 65 corresponds to Java 21, and Java 25 supports up to version 69. The message "69.0 … up to 65.0" therefore means: the server needs Java 25, but Java 21 is launching it. The exact numbers may vary depending on the Java version installed.
  • The official launcher is not affected: it installs the right Java itself for playing. This guide covers dedicated servers started with a .jar file, and third-party launchers that use a Java you chose.
  • Back up the world: the same 26.1 notes state that the way worlds and their data are stored has changed. Keep a copy of the world from before the update: it is your only possible rollback.
  • Modded or plugin servers: third-party server software (with mods or plugins) has its own requirements. Check its official documentation in addition to this guide.

Step 1: check which Java version is used

When to use it: always, first.

Suggested solution

  1. Open Command Prompt (type "cmd" in Windows search).
  2. Type the following command and press Enter:
Plain text3 lines

java -version
  1. Read the first line. It shows the Java version called by default, for example "21.0…" or "25.0…".
  2. To see every Java found by Windows, in the order they are used, type:
Plain text3 lines

where java

Expected result: you know which Java version starts your server.

When to stop: if the command already shows version 25 or later and the server still fails, your startup script may call another Java: go straight to step 4. If Windows says "java" is not recognised, no Java is reachable: go to step 3.

Step 2: back up the world first

When to use it: before starting the server for the first time on version 26.x.

Suggested solution

  1. Stop the server.
  2. In the server folder, copy the world folder (world by default, or the name given on the level-name line of the server.properties file) to another location, for example an external drive.
  3. Also copy the server.properties file and your startup script (.bat).

Expected result: you have a full copy of the world as it was before the update.

Rollback: if the new version does not suit you, put back the old server .jar file and the world copy.

When to stop: if the world is very large, wait for the copy to finish completely before continuing.

Step 3: install Java 25

When to use it: step 1 shows a version lower than 25, or no Java at all.

Suggested solution

  1. Open the official Download the Microsoft Build of OpenJDK page. This is the distribution Mojang includes with the game.
  2. In the OpenJDK 25 section, download the Windows x64 (.msi) installer. At the time of writing (November 2, 2026), the version offered is 25.0.5.0.2 LTS. Take the latest version shown.
  3. Run the installer. According to Microsoft, the installer updates the PATH variable by default, which lets Windows find this Java. Option labels may differ.
  4. Close and reopen Command Prompt, then type java -version again.

Expected result: java -version shows version 25.

Rollback: uninstall "Microsoft Build of OpenJDK" from Settings > Apps > Installed apps. Your old Java is not removed by this installation: keep it if other software needs it.

When to stop: on a PC with an ARM processor, choose the aarch64 package instead of x64.

Step 4: make the server start with Java 25

When to use it: Java 25 is installed, but the server still shows the error, or java -version still shows an old version.

Suggested solution

  1. Make a backup copy of your startup script (.bat).
  2. Open File Explorer in
C:\Program Files\Microsoft

and find the Java 25 folder. Its name starts with "jdk-25" and depends on the installed version.

  1. Open the startup script in Notepad. Replace only the word java at the start of the launch line with the full path to java.exe, in quotes. Keep the options already there (memory, nogui) and your .jar file name. Example, to adapt:
Batch3 lines

"C:\Program Files\Microsoft\jdk-25.X.X-hotspot\bin\java.exe" -jar server.jar nogui
  1. Save, then run the script.

Expected result: the server console loads the world without an UnsupportedClassVersionError.

Rollback: restore the script copy made in point 1.

When to stop: in the example, replace "jdk-25.X.X-hotspot" with the real folder name (it may be formed differently on your PC). Copy the real path shown in File Explorer. If another error appears (mods, plugins, port already in use), note it down: it is no longer the Java version problem.

Special cases

SituationWhat to know
Third-party launcherIt often uses the Java chosen in its own settings. Select Java 25 there for 26.x versions.
Server hostChoose Java 25 in the host's control panel if offered, or contact its support.
Server with mods or pluginsThe mod loader or server software must also be compatible with version 26.x. Check its official documentation.
Several Java versions installedWindows uses the first one found in PATH (see where java). The full path in the script (step 4) removes any ambiguity.
The game crashes at launch from the official launcherThat is a different problem: see the guide Minecraft Java crashes at launch ("Exit Code: 1", "The game crashed", black screen): solutions (French guide). Since 26.1, the game also allocates 4 GB of memory by default: Mojang points to a help article on memory allocation for PCs with less than 4 GB.
The server starts but players cannot connectSee the guide Failed to connect to a Minecraft Java server: causes and solutions (French guide).

Final check

  • ☐ A copy of the world from before the update is stored separately.
  • ☐ java -version shows version 25, or the script calls Java 25's java.exe directly.
  • ☐ The server starts and loads the world without UnsupportedClassVersionError.
  • ☐ Players use the same Minecraft version as the server.

Sources

Still having the problem?

Reply in this topic with the server's Minecraft version, the output of java -version and where java, the launch line of your script (without passwords or public IP address), the server software used (official, with mods or plugins) and the full error message. Never post your email address, Microsoft credentials or password.

Have an idea or a suggestion?

Be the first to join the discussion.

Reply

Reply without signing up using a TNF_… username saved on this device. You can post once every 30 minutes until you verify your email.

Add a GIF

Up to 5 GIFs per message.

Your draft stays on this device while you write.