Forge Server Tools · every failure mode · guides

UnsupportedClassVersionError class file version Minecraft

Wrong Java version — FATAL

What this actually means

The server (or a mod) was compiled for a newer Java than the one running it. Class file version 52=Java 8, 60=Java 16, 61=Java 17, 65=Java 21.

How to fix it

Minecraft 1.17-1.20.4 wants Java 17. 1.20.5+ and 1.21 want Java 21. 1.16 and older want Java 8. Point your start script at the right JDK explicitly rather than relying on whatever `java` resolves to on PATH -- that is usually the cause.

How to be sure it is this

java -version on the machine, and check what your start script actually invokes — they are often different.

What it gets mistaken for

Having the right Java installed is not the same as using it. Panels and scripts frequently pin an older JDK while the system default is current.

What to do next

Class file 52 = Java 8, 55 = 11, 60 = 16, 61 = 17, 65 = 21. Point the script at the right JDK by full path rather than relying on JAVA_HOME.

What it looks like in your log

Search your crash report or latest.log for any of these:

UnsupportedClassVersionError  ...  class file version
has been compiled by a more recent version of the Java Runtime
java.lang.UnsupportedClassVersionError

The free edition of Forge Server Doctor detects this one. It is a single Python file with no dependencies — point it at the report and it names the cause and the mod jar:

python3 forge_doctor_free.py crash-reports/crash-....txt