The Java version has to match the Minecraft version of your server. Since Minecraft 26.1 (March 2026) that is Java 25; 1.20.5 through 1.21.11 use Java 21, 1.18 to 1.20.4 Java 17, and old modpacks on 1.12.2 Java 8. If it does not match, the server will not start.
- Log in to the game panel and open your server.
- Go to the Startup tab.
- Under Docker Image, pick the Java version that belongs to your Minecraft version, for example Java 25 for 26.2.
- Check right away that the server version in the version selector matches; the two have to go together.
- Restart the server from the Console tab.
How to tell the Java is wrong
The console shows a line with UnsupportedClassVersionError and class file version. The number after it says which Java the server expects: 69 is Java 25, 65 is Java 21, 61 is Java 17, 52 is Java 8.
Which Java for which version
- 26.1, 26.2, 26.3: Java 25
- 1.20.5 through 1.21.11: Java 21
- 1.18 through 1.20.4: Java 17
- 1.12.2 through 1.16.5, and 1.7.10: Java 8
If you run a modpack, look at the pack's Minecraft version, not the newest release. The background and the full table are in which Java version your server needs. Stuck? Open a support ticket with the error line from the console.
Tip: at HostValues you can rent a Minecraft server and be online within minutes.