What Java Version Does Minecraft Need?
Enter your Minecraft version and we will tell you which Java it runs on.
The version your server runs, for example 1.20.1.
Or pick a common one
On an MCHosts server you never have to set this. We pick the right Java version automatically from the version or modpack you install.
You need
Java 21
Minecraft 1.21
Everything in the 1.21 line, including its point releases.
Or skip the Java install entirely
MCHosts picks the right Java version for whichever Minecraft version you choose, so there is nothing to match up by hand. Change version later and it follows.
🔒 Risk-free, 7 day money back guarantee. Australian servers, set up in minutes.
Java version by Minecraft version
This is the same mapping we use to build servers, so it reflects what actually works rather than what the requirements page says.
| Minecraft | Java | Notes |
|---|---|---|
| 1.16 and older | Java 8 | Older packs such as RLCraft sit here. Java 8 is long past its prime but these versions will not run on anything newer. |
| 1.17 to 1.20 | Java 17 | The Caves and Cliffs era through to Trails and Tales. Most established modpacks target somewhere in this range. |
| 1.21 | Java 21 | Everything in the 1.21 line, including its point releases. |
| 26.1 and newer | Java 25 | Mojang dropped the leading 1. in 2026, so these read 26.1 rather than 1.22. |
Reading the class file version error
When Java is too old the server does not explain itself. It prints an unsupported class file major version error with a number, and that number is the only clue. Here is what each one means.
| Class file version | Means you need |
|---|---|
| 52 | Java 8 or newer |
| 61 | Java 17 or newer |
| 65 | Java 21 or newer |
| 69 | Java 25 or newer |
Newer is not always better
It is tempting to install the latest Java and forget about it, but older Minecraft versions frequently refuse to run on it. Anything from 1.16 or earlier genuinely wants Java 8, and the modpacks built on those versions are the least tolerant of all. Match the version rather than reaching for the newest one available.
Frequently asked questions
Rather not think about Java at all? Our server plans pick the right version for you automatically, whichever Minecraft version or modpack you install.