Updated 30 November 2026
Every Minecraft server runs on Java, and each Minecraft version needs a certain Java version. When your server or a mod says "requires Java 21" (or 17, or 25), you switch it yourself in SparkPanel. It takes a minute.
How to switch the Java version
- Open your server in SparkPanel.
- Go to Settings and find the block Version (Java / runtime).
- Choose the Java version you need and save.
- Restart your server.
Your files and world stay as they are; only the Java version the server starts with changes.
Which Java version do I need?
| Minecraft version | Java version |
|---|---|
| 26.1 and newer | Java 25 |
| 1.20.5 to 1.21.x | Java 21 |
| 1.18 to 1.20.4 | Java 17 |
| 1.17 | Java 16 or 17 |
| 1.16.5 and older | Java 8 (some modpacks: Java 11) |
Modpacks and mods follow the Minecraft version they are made for. If a mod's page names a Java version, use that one.
Typical messages
- "Unsupported class file major version" or "has been compiled by a more recent version of the Java Runtime": your Java version is too old. Choose a newer one.
- A mod says it needs an older Java (for example Java 21 while the server runs Java 25): choose that version.