java.lang.UnsupportedClassVersionError
UnsupportedClassVersionError is Java telling you the .class file inside one of your mods was compiled against a newer Java version than the JVM running your server. It is one of the most common Minecraft modpack install crashes, and it almost always means the server is running the wrong Java major version for the modpack's Minecraft version.
Fastest path: paste your crash report into the Crash Doctor — it identifies this pattern and 40+ others automatically. No signup.
How to fix it
- 1
Match Java to your Minecraft version
Use Java 8 for Minecraft 1.7 through 1.12. Use Java 17 for 1.17 through 1.20.4. Use Java 21 for 1.20.5 and later. If your modpack ships a specific Java requirement (Better MC and ATM packs usually do), that wins over these defaults.
- 2
Confirm the version actually running
Run java -version on the server. If your host has multiple Java runtimes installed, the wrong one may be on PATH even though you 'set' a different one in the panel. CoalHosting servers expose the chosen Java in Settings → Runtime.
- 3
Look at the class-file version number in the error
The crash usually reads class file version 65.0 → that means Java 21 was needed, but a lower-version Java is running. 61.0 = Java 17, 55.0 = Java 11, 52.0 = Java 8. Match what the error wants.
- 4
Restart and watch the boot log
If the same line appears after a Java change, the wrong runtime is still bound. Stop the server, verify the Java binary path in your startup script, and try again.
Alternative causes
These can produce the same error message — worth ruling out if the steps above don't resolve it.
A single rogue mod compiled against a newer Java
Sometimes one mod in an otherwise-working pack ships a too-new class file. The crash names the offending package — disable that one mod and re-test before changing the whole runtime.
Mixed-version mods folder
If you dropped a 1.20.1 mod into a 1.19 pack, the older Java will reject the newer class. Match every mod's MC version to the loader's.
Frequently asked
What does class file version 65.0 mean?
65.0 = Java 21. Earlier major numbers map to earlier Java: 61.0 = Java 17, 55.0 = Java 11, 52.0 = Java 8. The number tells you the minimum Java the mod needs.
Will updating Java break my old modpack?
Yes — legacy Forge packs on Minecraft 1.7 through 1.12 require Java 8 specifically and will crash on Java 9+. Match Java to the modpack's MC version, not the latest available.
Why does the server start fine then crash on the first player join?
Some client-server-shared mods load their newer-Java classes only when a player connects. The fix is the same — switch Java to the version the mod expects.
Want this auto-fixed on your server?
CoalHosting's Minecraft hosting runs the same pattern database against every crash and applies the known fix before your players notice. Free crash diagnosis works on any server, hosted or not.
Related crashes
Last reviewed 2026-06-05. If a step is wrong or out of date, tell us — we'll fix the article and the auto-pattern at the same time.