/
mc-node.net →
Minecraft

How do I change the Java version of my Minecraft server?

Updated 04/09/20262 min read
In this article
  1. Which Java for which Minecraft version?
  2. Changing the Java version in the panel
  3. Errors that point to a wrong Java version
  4. Plugins and mods
  5. Memory and start-up flags
  6. Checking the version

Every Minecraft server runs on Java, and every Minecraft version wants a specific Java: too old and the server does not start, too new and old modpacks crash. At MC-Node the Java version is a setting of your server in the panel, so switching takes a minute and no installation.

Which Java for which Minecraft version?

  • Minecraft 26.1 and newer: Java 25.
  • 1.20.5 up to 1.21.x: Java 21.
  • 1.18 up to 1.20.4: Java 17.
  • 1.17: Java 16 (Java 17 works as well).
  • 1.12 up to 1.16: Java 8 (1.16 also runs on Java 11); most older Forge modpacks want exactly Java 8.

Paper, Purpur, Fabric and Forge follow the same rules as vanilla. The full background is in our blog article which Java version your server needs.

Changing the Java version in the panel

  1. Go to the game panel and click your server.
  2. Stop the server.
  3. Open Settings and look for Docker image.
  4. Pick the image with the Java version you need (for example Java 25, Java 21, Java 17 or Java 8) and save.
  5. Start the server and check the first lines of the console: they mention the Java version that is running.

Your world, plugins and settings are not touched; only the runtime changes. Switch back the same way if something does not work.

Errors that point to a wrong Java version

  • "UnsupportedClassVersionError ... class file version 69.0": the server needs a newer Java than it is running. 69 stands for Java 25, 65 for Java 21, 61 for Java 17, 52 for Java 8.
  • "Minecraft 26.1 requires running the server with Java 25 or above": same problem, stated plainly by the server itself.
  • "java.lang.NoClassDefFoundError" or "ClassCastException ... URLClassLoader" on an old Forge modpack: Java is too new; go back to Java 8.
  • The server stops immediately without an error: also check the Java version before anything else.

Plugins and mods

Plugins follow the server: a plugin built for Java 21 does not load on a Java 17 server (UnsupportedClassVersionError in the console at start-up). After changing the Minecraft version, always check that your plugins have a release for it. Modpacks specify their Java version on their page; use exactly that one.

Memory and start-up flags

Changing Java does not change your memory allocation or start-up flags; those stay as set by the panel. Java 21 and 25 use a modern garbage collector by default that performs well for Minecraft, so extra flags are rarely needed on a hosted server.

Checking the version

Type version or about in the console after start-up; on Paper the output includes the Java version. The very first lines of the console at start-up show it as well, for example Starting with Java 25.

Not sure which image to pick for a modpack? Open a ticket with the name of the pack and we will set it for you.