Java 16 for Minecraft Servers
Minecraft servers from 1.17 to 1.17.1 require Java 16 or newer (class file version 60), according to Mojang's version data. Eclipse Temurin 16 is a free, widely used build.
Minecraft versions that need Java 16
According to Mojang's version data, these Minecraft releases require Java 16 as the minimum (newer Java versions also work for vanilla and Paper-family servers):
1.17.1, 1.17
Java 16 was a short-term release and no longer receives updates. Because the requirement is "16 or newer", Minecraft 1.17 and 1.17.1 servers also run on Java 17, which is the easier choice to install.
Snapshots and pre-releases of these versions have the same requirement. Full table: Minecraft → Java versions.
Install Java 16 (Eclipse Temurin)
Temurin is a free OpenJDK build from the Eclipse Adoptium project. Download installers from adoptium.net — Temurin 16 , or use a package manager:
REM Windows (winget) winget install EclipseAdoptium.Temurin.16.JDK
There is no Homebrew cask or Adoptium apt package for Java 16. On macOS and Linux either download the archive from adoptium.net or install Java 17 instead.
Check it and use it for your server
Open a new terminal and run java -version. For Java 16 the first line starts with openjdk version "16.. If another version appears, your PATH points to a different Java — call the right one by full path in your start script:
REM Windows: see dir "C:\Program Files\Eclipse Adoptium" for the exact folder "C:\Program Files\Eclipse Adoptium\jdk-16…-hotspot\bin\java.exe" -Xms4G -Xmx4G -jar server.jar nogui # macOS "$(/usr/libexec/java_home -v 16)/bin/java" -Xms4G -Xmx4G -jar server.jar nogui # Linux: the java binary inside the folder you extracted the archive to /opt/jdk-16…/bin/java -Xms4G -Xmx4G -jar server.jar nogui
On Debian/Ubuntu you can instead switch the system default with sudo update-alternatives --config java. The start script generator writes a script that checks the Java version first.
Error message for Java 16 jars
A server jar that needs Java 16, started with an older Java, fails with UnsupportedClassVersionError mentioning class file version 60.0:
… has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to …
Install Java 16 as above and make sure the start script uses it. Walkthrough: fix UnsupportedClassVersionError.