What Java version do I need (17 / 21) and how do I set it?
Every Minecraft version expects a particular Java version, and a mismatch is one of the most common reasons a server won't start. The good news is you can set the Java version yourself on the Settings page.
Which Java version you need
- Java 8 for older versions (1.16 and below).
- Java 17 for roughly 1.17–1.20.4.
- Java 21 for 1.20.5+ and 1.21+.
Newer Minecraft needs newer Java, so match the two before you start.
How to set it
- Open the Settings page.
- Use the Docker image / Java version selector to pick the right version for your Minecraft version.
- Save and start the server.
Warning: A wrong Java version is a common "won't start" cause — the Console will show something like "unsupported class version" when Java and Minecraft don't match.
Frequently asked questions
How do I know which Java my version needs? As a guide: Java 8 for 1.16 and below, Java 17 for 1.17–1.20.4, and Java 21 for 1.20.5 and newer.
Where do I change it? On the Settings page, via the Docker image / Java version selector. If the image is admin-locked, open a ticket.
More in Startup Command & Java
- How do I edit, reset, or roll back my startup command — do I need a ticket?
- Can I use custom startup flags (MaxRAMPercentage, -nogui, velocity flags, OpenJ9)?
- Should Xms and Xmx be equal? What values?
- My startup command "looks weird" / shows ./bedrock_server — is that normal?