Which Java version does my Minecraft server need?

Short answer: Minecraft 26.1 and newer runs on Java 25. Versions 1.20.5 through 1.21.11 need Java 21, 1.18 through 1.20.4 run on Java 17, and most old modpacks on 1.12.2 or 1.7.10 use Java 8. Pick a Java that is too old and the server will not start; you get an error about class file version. Pick one that is too new and it usually works, though not always with mods.

The full table

Minecraft versionJava versionNote
26.1, 26.2, 26.3 (2026)Java 25Required since 26.1. Paper and Purpur builds for these versions will not start on Java 21.
1.20.5 through 1.21.11Java 21Most current modpacks on 1.21.1 (All The Mods 10, Cobblemon, Pixelmon) live here.
1.18 through 1.20.4Java 17Prominence II on 1.20.1 and many Forge packs from 2023 and 2024.
1.17Java 16A transition year; Java 17 works in practice too.
1.12.2 through 1.16.5Java 8RLCraft and other classic packs. Newer Java often breaks mods.
1.7.10 through 1.11Java 8Legacy. Java 8 only.

The table follows the Paper requirements. Vanilla, Fabric, Forge and NeoForge have the same boundaries: the Java requirement comes from Minecraft itself, not from the server software.

Why is Java 25 suddenly required?

With 26.1 (24 March 2026) Mojang moved to a new version numbering scheme and raised the minimum Java from 21 to 25 at the same time. The launcher handles that automatically for players. A server has no such luxury: you decide which Java runs, and a wrong choice means a server that never comes up. Since that change this has become by far the most common reason a server stays down after a version switch.

How to recognise it

The console shows it right away. This line, or a variant of it, means the Java is too old for the chosen server version:

java.lang.UnsupportedClassVersionError: ... has been compiled by a more recent
version of the Java Runtime (class file version 69.0), this version of the
Java Runtime only recognizes class file versions up to 65.0

The number after class file version tells you which Java the server expects: 69 is Java 25, 65 is Java 21, 61 is Java 17, 52 is Java 8. If it says "up to 65.0", you are running Java 21 while 25 is required.

Setting Java in the game panel

  1. Open your server in the game panel and go to the Startup tab.
  2. Under Docker Image, pick the Java version from the table above, for example Java 25 for 26.2 or Java 21 for a 1.21.1 modpack.
  3. Restart the server from the Console tab.

The Java choice is separate from the server version. If you change Minecraft version through the version selector, always check the Java image as well. The two have to match.

Modpacks: look at the pack's Minecraft version

A modpack runs on a fixed Minecraft version, and that decides the Java. All The Mods 10 and Pixelmon 9.4 sit on 1.21.1 and want Java 21. Prominence II is on 1.20.1 and wants Java 17. RLCraft is on 1.12.2 and wants Java 8. All The Mods 11 has already moved to 26.1.2 and wants Java 25. Starting an old pack on a new Java rarely works, because old Forge versions rely on internal Java components that were later removed.

Can I just always pick the newest Java?

For Vanilla, Paper and Purpur from 1.18 onwards, usually yes. For modpacks, no: Forge and many mods on 1.12.2 and 1.16.5 only work on Java 8, and packs on 1.20.1 are tested on Java 17. Use the Java that belongs to the Minecraft version and you know it will work.

My server will not start after updating to 26.2, what now?

Nine times out of ten the Java image is still on 21. Set it to Java 25 in the Startup tab and restart. If it still fails, look in the console for the first line containing "Error" or "Exception" and include it in a ticket.

Do I need to change my world when I switch Java?

No. The Java version only affects the program running the server, not your world files. Switching Minecraft version is a different matter: that only works upwards and cannot be undone. Always make a backup first through the Backups tab.

Which Java versions does HostValues offer?

Java 8, 11, 16, 17, 21 and 25 are available in the panel. You pick them per server and can switch at any time. When a new Minecraft release lands, we usually have the matching Java ready within a day.

No server yet? Every Minecraft plan supports every version in the table, with per-server Java selection included.

Ready to get started?

View our plans and pricing, or order directly.

View plans Order now

Still stuck? Open a support ticket and our team will help you out.

Back to the blog