How to Fix "Unsupported Class Version" Errors in Minecraft Servers

The most common reason self-hosted Minecraft servers fail to start, and how to fix it for good.

3 min read · Beginner · Last updated May 2026 ← All guides

What you'll learn

  • Why your Minecraft server is throwing UnsupportedClassVersionError
  • Which Java version each Minecraft release expects
  • How to install the correct Java version without breaking your existing one
  • How to make MC Server Manager handle this for you automatically, every update

If your Minecraft server is crashing with an error like:

Exception in thread "main" java.lang.UnsupportedClassVersionError

You're running the wrong version of Java for your Minecraft version. This is the most common reason self-hosted servers fail to start.

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 and newer (1.21+)Java 21 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

This works, but you'll need to repeat it every time you update Minecraft.

The automatic fix

MC Server Manager detects the Java version your server needs and either uses an already-installed version or downloads the correct one for you, automatically, every time.

You never touch Java again.

The Lite version is completely free and includes Auto Java Detection with no time limit on this feature.