Minecraft: Which Java version do I need?

Which Minecraft version needs which Java – and what the typical error messages mean.

2 minute read Updated 28.10.2026

Every Minecraft version needs a specific Java version. If it doesn't match, the server stops right at startup.

Normally you don't have to do anything: when you change the Minecraft version in the Installer tab under Server version, we set the matching Java automatically. Only change the Java version under Startup variables → Java version if the server doesn't start afterwards – e.g. after uploading your own server or modpack.

Which version fits?

Minecraft versionJava version
26.1 and newerJava 25
1.20.5 to 1.21.xJava 21
1.17 to 1.20.4Java 17
1.16.5 and olderJava 8 (some modpacks also Java 11)

The Java version in the table is the minimum. Newer Java usually works too – with one exception: older Forge modpacks (Minecraft 1.16.5 and older) usually run only with Java 8.

If the Java version you selected is below the minimum for the installed Minecraft version, we show you a warning directly under Startup variables.

Typical error messages in the console

  • "… requires running the server with Java 25 or above" – Java is too old. Select the version mentioned.
  • "UnsupportedClassVersionError … class file version 65.0" – Java is too old. The number tells you which Java is needed: 52 = Java 8, 61 = Java 17, 65 = Java 21, 69 = Java 25.
  • Forge server crashes immediately with Java 17 or newer (often with "ClassCastException" or "Unsupported class file major version") – switch back to Java 8 for old modpacks.

How to change the Java version

  1. Server page → Startup variables tab.
  2. On the right under Java version, select the matching version and click Apply.
  3. Restart the server.

Good to know

  • The Java version has nothing to do with the Java or Bedrock Edition – it only concerns the runtime on the server. Your players don't need to install anything for it.
  • If the server doesn't start despite the matching Java, it's often due to plugins or mods – see Server doesn't start.
Was this helpful?