Guide · Getting started

Which Java version does a Minecraft server need?

Java Edition servers run on Java, and each Minecraft release needs a minimum Java version. Starting a server on the wrong one is one of the most common reasons it crashes instantly with a confusing error.

The version table

Use the newest Java your Minecraft version supports. These are the minimums:

  • Minecraft 26.1 and newer: Java 25
  • Minecraft 1.20.5 to 1.21.11: Java 21
  • Minecraft 1.17 to 1.20.4: Java 17
  • Minecraft 1.16.5: Java 16 (Java 17 works)
  • Minecraft 1.12 to 1.16.4: Java 11; Minecraft 1.7.10 to 1.11: Java 8

Do not confuse the version numbers

Since 2026 Minecraft Java uses year-based version numbers such as 26.1. That number has nothing to do with the Java version. Minecraft 26.1 runs on Java 25, not on a "Java 26".

Very old Minecraft versions can break on very new Java releases, and some old modpacks only run on Java 8. For anything 1.16.5 or older, use what the modpack or server software recommends.

Recognising a Java version error

A server started on a Java that is too old usually stops immediately with an UnsupportedClassVersionError that mentions a class file version, such as "class file version 65.0". Paper also prints a clear message saying which Java it needs.

  • Class file 69 is Java 25
  • Class file 65 is Java 21
  • Class file 61 is Java 17
  • Class file 52 is Java 8

Changing Java on your server

At home, install the matching Java build, such as Eclipse Temurin, and either make it the default or point your start script at it with its full path. Run java -version to check what the system uses.

On a hosted server you normally pick the Java version from the startup or Docker image settings rather than installing it. On StormNodes this lives on the server's Startup page. Update Java before updating Minecraft, so the server can start on the new version straight away.

StormNodes Minecraft hosting

Run it on a StormNodes server

Skip the port forwarding and the PC that has to stay on. A StormNodes Minecraft server is online in minutes, and everything in this guide can be done from the panel.

  • Hosted in Portugal, close to players across Western Europe
  • NVMe storage, monthly billing and no setup fee
  • Paper, Purpur, Fabric and vanilla, switchable from the panel
  • Live console, file manager, SFTP, backups and schedules
  • Support in English and Portuguese

FAQ

Frequently asked questions

What Java version do I need for Minecraft 1.21?
Java 21. Every release from 1.20.5 up to 1.21.11 needs Java 21 or newer.
Does Minecraft 26.1 need Java 26?
No. Minecraft 26.1 and newer need Java 25. The Minecraft version number and the Java version number are unrelated.
Will a newer Java make my server faster?
Newer Java releases often bring small garbage collection and performance improvements, so it is worth running the newest version your Minecraft release supports. It will not fix lag caused by plugins, farms or too high a view distance.