The error message already contains the answer: If it says class file version 65.0, the file requires Java 21. The calculation is always the same: number minus 44 equals the Java version. More important than the number, though, is the question of whose file is meant: In most cases, the server is not too old; a single plugin is too new.
Reading the message
A typical line looks like this:
java.lang.UnsupportedClassVersionError: com/example/PluginMain has been compiled by a more
recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime
only recognizes class file versions up to 61.0
It contains three pieces of information:
com/example/PluginMain— who is causing the error. If a plugin or mod name appears here, this one file does not fit; the server itself is fine.class file version 65.0— what is required: 65 − 44 = Java 21.only recognizes … up to 61.0— what is running: 61 − 44 = Java 17.
Translated: A plugin built for Java 21 is on a server running Java 17.
Conversion table
| class file version | Java version |
|---|---|
| 52.0 | Java 8 |
| 55.0 | Java 11 |
| 60.0 | Java 16 |
| 61.0 | Java 17 |
| 65.0 | Java 21 |
| 69.0 | Java 25 |
The numbers come from the official JVM specification. The offset of 44 has been constant there since Java 1.0, so you can calculate any future version yourself without extending the table.
Remember: A Java runtime always understands all older class file versions, but never a newer one. That is why a Java 8 plugin runs without problems on Java 21, but never the other way around.
Which Java version does each Minecraft version need?
| Minecraft version | Required Java |
|---|---|
| up to 1.16.5 | Java 8 |
| 1.17 – 1.17.1 | Java 16 (practically Java 17) |
| 1.18 – 1.20.4 | Java 17 |
| from 1.20.5 | Java 21 |
| from 26.0 | Java 25 |
You do not need to configure this with us. We derive the runtime from your server’s Minecraft version and set it automatically. If you order 1.21, you get Java 21 without having to look for a switch.
For server forks like Leaf and Leaves, we also maintain an exact mapping per release instead of adopting the general rule. The reason: A fork may differ from the Vanilla requirement, and an optimistic assumption would fail exactly when it matters. If no suitable Java version exists for a combination, we deliberately abort the process instead of starting a runtime that is too low. A server that never starts incorrectly is easier to fix than one that half-runs.
The most common case: a plugin, not the server
If your server was running until just now and the error appeared after adding a file, the situation is clear. Proceed like this:
- Write down the class name from the message. It almost always names the project.
- Look for the right build variant from the provider. Many plugins offer separate downloads for Java 17 and Java 21, often with the suffix
-java17or as a separate release branch. The newest file is not automatically the right one. - If there is no suitable variant, you need a newer Minecraft version, because only that brings the newer runtime with it. How to change the version without losing your world is explained in Change Minecraft Server Version.
- Remove the plugin for now if the server urgently needs to run. Install Minecraft Mods and Plugins shows how to add and remove plugins cleanly.
The other case: Java is too new
This case is rarely explained, but it happens regularly. Old Forge modpacks, with 1.12.2 as the classic example, are built for Java 8. On Java 21 they fail, though usually not with UnsupportedClassVersionError, but with messages about missing internal classes or rejected startup parameters.
Sign: The pack used to run, or it runs for others, and your server names a very old Minecraft version. The solution is then not newer Java, but the Minecraft version that belongs to the pack in the panel. That lets us set the matching older runtime.
Honest note: Our automatic correction does not apply in this case. It only repairs in the “too old” direction, meaning when the server needs a newer Java version than the one currently running. Java that is too new is deliberately not treated as drift; otherwise a customer who intentionally selected an older runtime would automatically lose it again.
What we handle automatically
- Matching runtime from the order onward. The Java version follows the Minecraft version, without a setting.
- Correction when changing versions. If you switch to a version with a higher Java requirement, the runtime is moved along with it.
- The boot log beats the calculation. If your server itself names a required Java version during startup that is higher than the running one, we correct it based on that measurement, not based on the version ordered. A statement from the server about itself is more reliable than any table.
- Custom images remain untouched. If your server runs on a runtime you selected yourself, we do not intervene.
- Fail closed instead of half right. If no suitable Java exists for a combination, we abort and report it instead of starting the wrong runtime.
Troubleshooting
| Symptom | Check | Solution |
|---|---|---|
class file version 65.0 is named, class name is a plugin |
Did the server run before adding it? | Download the plugin build for your MC version |
| Error directly during server startup, no plugin named | Which Minecraft version is running? | Align version and runtime |
| Old 1.12.2 modpack does not start | Does the log mention missing internal classes? | Java is too new — choose the matching MC version |
| Error after version change | Did it appear directly after the change? | Wait for the restart; if it remains, contact support with the full line |
| Plugin loads, but features are missing | Does the log show a warning instead of an error? | Different cause — not the Java version |
FAQ
Can I change the Java version myself?
With us, that is not necessary: It is determined by your server’s Minecraft version. If you need a different runtime, the right path is changing the Minecraft version. Then the whole environment fits together.
Is newer Java always better?
No. For Minecraft, the required version is also a practical upper limit: server core, mods, and plugins are tuned for it. Jumping to a higher runtime “just in case” brings no benefit and breaks older mods.
Why does my plugin run locally, but not on the server?
Because your local Java installation may be newer than the server’s. What matters is the runtime on the server, not the one on your computer.
How do I know which Java my server is currently running?
The message tells you: only recognizes class file versions up to 61.0 means Java 17. Without an error message, the server startup names the Java version in the first console lines.
Do I need to recreate my world after a Java change?
No. The runtime only affects execution, not the world format. Changing the Minecraft version, however, can change the world format, so create a backup first.
Next steps
If the server is running again but is slow, Minecraft Server Lagging: Fix Watchdog Timeout can help. If the RAM does not fit the modpack size, the Minecraft RAM Calculator calculates the requirement.
Looking for a server where the Java version automatically matches the game version? You can find the plans at Rent a Minecraft Server.
Sources and test setup
- Java requirements by Minecraft version: Minecraft Wiki — Server/Requirements. Explicitly names Java 16 from 1.17, Java 17 from 1.18, and Java 21 from 1.20.5.
- Mapping of class-file versions: Oracle — The Java Virtual Machine Specification, Java SE 21, Table 4.1-A. Confirms 52 = Java 8, 55 = Java 11, 60 = Java 16, 61 = Java 17, 65 = Java 21, as well as the rule that a JVM only supports the listed versions and no higher ones.
- Java 25: Oracle — The Java Virtual Machine Specification, Java SE 25, Table 4.1-A. Confirms major 69.
Test setup: August 24, 2026. New Minecraft versions can bring new Java requirements; the linked sources reflect the current state at the time.