«UnsupportedClassVersionError»: wrong Java version

Errors & Fixes Reviewed September 6, 2026 1 min read

This error is Java saying it was handed a file compiled by a newer Java than itself. It is never about your world or your plugins being wrong — it is a version number mismatch, and it has a clean fix.

What you are seeing

  • java.lang.UnsupportedClassVersionError
  • has been compiled by a more recent version of the Java Runtime
  • The server stops within seconds of starting, before the world loads.

Why it happens

Each Minecraft version needs a minimum Java. Roughly: 1.17 and 1.18 need Java 17, 1.19 and 1.20.4 run on 17, and 1.20.5 onwards needs Java 21. A jar built for a newer Java simply will not load on an older one.

What to do

  1. Read the two numbers in the message

    It names the class file version it got and the one it supports. 65 means Java 21, 61 means Java 17, 60 means Java 16.

  2. Raise the Java version in the panel

    The startup settings let you pick which Java the server runs on. Choose one that meets the minimum for your Minecraft version.

  3. Restart and read the console again

    The error should be gone entirely. If a different plugin now complains, that plugin needs updating for the newer Java.

How to confirm it worked

The console reaches Done and no class version error appears anywhere in the log.

Worth knowing

Running the newest Java is not always right either. Some older modpacks refuse to build on Java 21 and need 17 specifically — match the pack's own requirement rather than always going highest.