Match Java to Minecraft
Recognize the usual version errors without memorizing Java releases.
The runtime must match the game#
Java is the runtime that executes a Minecraft server. A Java release can be too old for a newer server, while some old mod loaders or mods do not support the newest Java. Crafty’s container may include several Java versions; choose the one required by the exact Minecraft release.
For vanilla and Fabric, use this starting point. Individual modpacks and server implementations can require a different runtime.
| Minecraft generation | Typical Java requirement |
|---|---|
| 1.16.5 and older | Java 8 for many packs |
| 1.17.x | Java 16 |
| 1.18 through 1.20.4 | Java 17 |
| 1.20.5 through 1.21.x | Java 21 |
| 26.1 and 26.2 | Java 25 according to current Fabric documentation |
Using Paper? Follow Paper's own requirements ↗: its recommended runtime is Java 21 for Minecraft 1.20 through 1.21.11, and Java 25 for 26.1 and later. Do not use the vanilla/Fabric table to override your chosen server's instructions.
Recognize a Java error#
“Unsupported class file major version,” “compiled by a more recent version,” or a message requesting a specific Java release usually means the selected runtime is too old. Immediate crashes involving removed Java modules can mean it is too new for an old pack.
- 1Stop the server cleanly and record the exact Minecraft, server-software or modpack release.
- 2Check the launch method used by your saved plan:
- Crafty: open the server’s Config/runtime selection and choose the matching bundled Java.
- Windows start script: run
java -version, install the required runtime, and make surestart.batlaunches that executable. - Linux service or terminal: run
java -versionas the server user and check the Java path in the systemd service or launch command. - Hosting panel: choose a supported Java image/runtime for this exact server release; ask the provider if the required version is absent.
- 1Select or install the Java release required by the exact Minecraft release or server-pack documentation.
- 2Start the server and read the first specific error—not only the final “process exited” line.
- 3Keep an older runtime if another server still depends on it; change one server’s launch path rather than replacing Java blindly.