Every Minecraft version needs a particular Java version. If the Java version is wrong, the server won't start, usually with an error like UnsupportedClassVersionError or "has been compiled by a more recent version of the Java Runtime".
| Minecraft version | Java version |
|---|---|
| 26.1 and newer | Java 25 |
| 1.20.5 to 1.21.11 | Java 21 |
| 1.18 to 1.20.4 | Java 17 |
| 1.17.x | Java 17 (16 also works) |
| 1.16.5 and older | Java 8 (some setups also run on 11) |
Old Forge modpacks, especially 1.12.2 and 1.7.10, usually need exactly Java 8. Check the modpack page if you're not sure.
The table gives general Minecraft requirements. A particular Paper build, plugin or modpack can require a different supported Java release; follow that software's own requirements.
Every Java version Minecraft needs is in the list. If the Docker Image option is locked, or you're not sure which to pick, open a support ticket with your Minecraft version and server type.
Newer isn't always better. A newer Java usually runs older Minecraft fine, but old modpacks and some old plugins break on anything past Java 8 or 17. Always match the table first.
Current requirements: Mojang's 26.1 release notes and Paper's Java compatibility table. A modpack may require a specific older runtime.