// voxen field notes

Which Java Version Does a Minecraft Server Need? (2026 Table)

· updated · 7 min read · [ TUTORIAL ] · by Matteo Orazietti

Every Minecraft server runs on Java, and the version you need depends on the Minecraft version you run. Pick the wrong one and the server either refuses to start, or your plugins fail with an error that never says the words "wrong Java version". This is the reference table, how to check what you are running, and how to fix it.

Which Java version each Minecraft version needs

Minecraft versionMinimum JavaPaper recommends
1.7.10 to 1.11.2Java 8Java 8
1.12 to 1.16.4Java 8Java 11
1.16.5Java 8Java 16
1.17 to 1.17.1Java 16Java 17
1.18 to 1.19.4Java 17Java 17
1.20 to 1.20.4Java 17Java 21
1.20.5 to 1.21.11Java 21Java 21
26.1 and newerJava 25Java 25

The minimum is what the server needs to start. The Paper recommendation is the version the Paper team tests against, and it is the one to choose for a new server. Newer Java usually runs older Minecraft fine, but staying on the recommended version avoids surprises. For 26.1 and newer, the Java 25 figure comes from the PaperMC documentation.

The version numbers changed in 2026. 1.21.11 (December 2025) was the last release with a 1. prefix. Java Edition now uses year-based versions: 26.1 (24 March 2026), 26.2 (16 June 2026) and 26.3 (15 September 2026). Every 26.x release needs Java 25, so moving a server from 1.21.x to 26.x means installing a new JDK, not only a new jar.

Check which Java you are running

Open a terminal on the machine that runs the server and type the command below. The Java it prints is the one that will launch your server.

terminal — terminal
java -version
openjdk version "21.0.x" ...

On a hosting panel there is usually a Java version selector in the startup settings. If you don't see one, ask your host which runtime the server uses.

What the error looks like

When a plugin was compiled for a newer Java than the one running the server, the console prints something like this:

terminal — server console
java.lang.UnsupportedClassVersionError: com/example/hello/HelloPlugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0

The number after "class file version" is the Java version the plugin was built for, using the formula44 + Java version. So 52 is Java 8, 55 is Java 11, 60 is Java 16, 61 is Java 17, 65 is Java 21 and 69 is Java 25. In the example above the plugin needs Java 21 and the server runs Java 17.

How to fix it

  1. Read the Minecraft version from your server file name, for example paper-1.21.1-XX.jar, and find it in the table above.
  2. Install the matching JDK. Eclipse Temurin is a free, widely used build for every major Java version.
  3. Point the server, or your host's Java selector, at the new runtime.
  4. Stop the server and start it again, then read the first lines of the console. A restart is required; a/reload does not change the Java runtime.

Plugins have a Java version too

The same rule applies when you build a plugin: compile it with a Java version that is not newer than the one your server runs. In Maven, set maven.compiler.release in pom.xml to the server's Java version. For a server on Java 17, that is 17, and the plugin will load on it.

Quick diagnosis: if the server starts but one specific plugin fails with UnsupportedClassVersionError, the problem is that plugin's build, not your server. Rebuild it for your Java version or get a build that targets it.

For other startup problems, read How to Fix Minecraft Plugin Errors. Once Java matches, follow the installation guide to load the plugin correctly.