Fixing "Unsupported Class Version" errors on a Minecraft server

If your server stops as soon as you start it with this in the console:

Exception in thread "main" java.lang.UnsupportedClassVersionError

then the Java on your PC is older than the one your Minecraft version needs. It's the most common reason a self-hosted server won't start, usually right after updating Minecraft.

The rest of that line names two class file versions. The first is the Java the server needs, the second is the newest your Java can run. 52 is Java 8, 60 is Java 16, 61 is Java 17, 65 is Java 21 and 69 is Java 25.

Updated October 2026

Why this happens

Minecraft's server software is compiled for a specific version of Java. When the Java installed on your machine doesn't match what the server expects, you get this error.

Minecraft Version Required Java
1.8 to 1.16Java 8
1.17Java 16 or newer
1.18 to 1.20.4Java 17 or newer
1.20.5 to 1.21.11Java 21 or newer
26.1 and newerJava 25 or newer

Most players have one version of Java installed. If you update Minecraft but not Java, the server breaks.

The manual fix

  1. Find out which Minecraft version your server runs
  2. Look up the required Java version in the table above
  3. Go to Adoptium (adoptium.net) and download the correct version
  4. Install it without overwriting your existing Java (if you use it for other things)
  5. Point your server launcher at the new Java executable manually

You'll only need to do this again when you update across one of the lines in the table, 1.20.4 to 1.20.5 for example, or 1.21.11 to 26.1.

The automatic fix

MC Server Manager works out which Java your server needs before it starts. If you've already got that Java installed it uses it. If you haven't, it downloads the right one. It does this every time, so updating Minecraft never leaves the server on the wrong Java.

Lite does this too.

Other guides