Which Java version does a Minecraft server need?
Short answer
Minecraft 1.20.5 and newer needs Java 21 or newer. 1.18 to 1.20.4 needs Java 17, 1.17 needs Java 16, and older versions use Java 8. EnderPanel downloads the right one for each server by itself.
Java by Minecraft version
- 1.20.5 and newer: Java 21 or newer
- 1.18 to 1.20.4: Java 17
- 1.17: Java 16
- 1.16.5 and older: Java 8
'UnsupportedClassVersionError'
This means the server needs a newer Java than the one that started it. Often a newer Java is installed, but the computer's default (or JAVA_HOME) still points at an old one.
Fixing it yourself
Install the right version from adoptium.net (Eclipse Temurin), then start the server with the full path to that Java instead of plain java, or change the default. With several servers on different versions, each needs its own.
Quick questions
Do I need the JDK or the JRE?
To run a server, the JRE is enough. EnderPanel uses the Temurin JRE.
Can Java 21 run older Minecraft?
Often, but very old versions (1.16 and before) are happiest on Java 8.
Is Java safe to install?
Yes, from a trusted source such as Adoptium. Avoid random download sites.
Back to the website