Which Java does my Minecraft server need?
Choose your Minecraft version and get the Java to install, a download link and a start command.
Java 21.
Download Java 21 (Temurin) Start commandjava -Xms4G -Xmx4G -jar server.jar nogui Every version at a glance
| Minecraft | Java | Note |
|---|---|---|
| 1.0 to 1.12.2 | 8 | Built for Java 8. Newer Java can break old servers. |
| 1.13 to 1.16.5 | 8 | Java 8 is the minimum; Java 11 also works and is what Saryno uses. |
| 1.17 to 1.17.1 | 16 | Java 16 is the minimum; Java 17 also works. |
| 1.18 to 1.20.4 | 17 | Java 17. |
| 1.20.5 to 1.21.x | 21 | Java 21. |
| 26.1 to newest | 25 | Recent releases need Java 25. |
Why the Java version matters
Minecraft is written in Java, and every few years the game moves to a newer Java to use its improvements. A server started with a Java that is too old refuses to run, and one that is much newer than the game expects can break old versions or plugins.
Use a distribution such as Eclipse Temurin (Adoptium) for the major version in the table. The start command above sets how much memory the server may use.
Questions
Can I use a newer Java than the table says?
Often yes for the modern versions, but not always. Newer Minecraft versions need at least the listed Java and older ones can break on newer Java. Match the table unless you know the software supports more.
What does UnsupportedClassVersionError mean?
It means the server was built for a newer Java than the one that started it. For example "class file version 65.0" means Java 21 is needed and an older one was used. Install the Java from this page and start the server again.
How do I check which Java I have?
Open a terminal and run java -version. It prints the version number of the Java that starts your server. If you installed several, make sure the one in your start command is the right one.
Do I need to do this on Saryno?
No. Saryno picks the right Java for the version you choose, including very old ones like 1.8.
Related guides
More free tools
Ready to run it?
1 GB is free forever, with no card and no ads. Add memory when you need it.
Make a free server