How to change the Java version of a Minecraft server

Server configuration · updated 28 November 2026

Every Minecraft version needs the right Java version. The panel usually sets it for you when you change the server software, but with old versions and modpacks you sometimes have to change it yourself.

Which Java for which version

MinecraftJava
1.8 - 1.16.5Java 8 (1.16.5 also runs on 11)
1.17Java 16 or 17
1.18 - 1.20.4Java 17
1.20.5 - 1.21.11Java 21
26.1 and newerJava 25

How to change it

  1. Stop the server.
  2. Open the Settings tab.
  3. In the Docker image box choose the Java version from the list.
  4. Start the server.
Changing the Java version of a Minecraft server in the Docker image box
The Docker image box in the Settings tab

Signs of the wrong Java version

The console shows one of these errors:

  • Unsupported class file major version or UnsupportedClassVersionError - Java is too old, pick a newer one,
  • on old versions and Forge 1.12.2 mods, the server shuts down right after starting - pick Java 8.

Frequently asked questions

I cannot change the image, the field is locked.

The image was set manually by an administrator. Message us and we will change it.

Is newer Java always better?

For new game versions, yes. Older Minecraft versions and old mods often do not run on new Java, so stick to the table.