Java Version Compatibility
Which Java version to use for your Minecraft server based on the server version.
Overview
When installing or upgrading a Minecraft server, one of the most important parameters to configure correctly is the Java version. Using the wrong Java version will prevent your server from starting.
The "Java version" refers to the underlying Java runtime environment, not the "Java Edition" of Minecraft. This only applies to Java Edition servers - Bedrock Edition does not use Java.
Compatibility Table
Server Version | Java Version |
---|---|
1.16.5 & older | Java 8 |
1.17 - 1.17.1 | Java 16 |
1.18 - 1.20.4 | Java 17 |
1.20.5 + | Java 21 |
Important Notes
- Always use the correct Java version - Your server will not start with an incompatible version
- Newer Java versions generally won't work with older Minecraft versions
- On Lagless hosting, the Java version is automatically configured based on your server version selection
- For modded servers, check your mod loader's requirements as they may have specific Java version needs
Quick Reference
- Most current servers (1.20.5+): Use Java 21
- Popular versions (1.18-1.20.4): Use Java 17
- Legacy servers (1.16.5 and older): Use Java 8