Which Java version does each Minecraft version need?

By Kosy · · 1 min read

A Minecraft server is a Java program, so it needs a Java runtime that the game version supports. Too old and the server will not start. A newer major version than the game was tested with can break old plugins.

The table

Minecraft version Java to use
1.8 to 1.12 Java 8
1.13 to 1.16 Java 11 (Java 8 also runs)
1.17 to 1.20.4 Java 17
1.20.5 to 1.21.x Java 21
26.1 and newer Java 25

This is what Saryno picks for you: it chooses the Java version from the Minecraft version, so you do not install anything.

The errors you see

  • UnsupportedClassVersionError ... class file version 65.0: the server needs a newer Java than the one running. 65 is Java 21, 61 is Java 17, 52 is Java 8.
  • java.lang.UnsupportedClassVersionError with a plugin name: the plugin was built for a newer Java than the server's.
  • The server starts but a plugin throws errors on load: the plugin uses an internal that changed. Update it.

The crash log analyzer reads these and tells you which Java to use.

Checking on your own machine

Run java -version. If you have several installed, point to the right one by its full path in the start command. The Java version checker gives you the Java version and the start command for a Minecraft version.

Upgrading a world

When you move a server to a newer Minecraft version the Java requirement moves with it, so check this table before you update, and read how to update a server without losing your world.

More to read