Direct answer
Several Minecraft servers can use different JDK releases on one host. Install the runtimes side by side and launch each process using a verified absolute Java path.
Recommended procedure
- Identify the required Java major version for each specific server JAR, proxy and mod loader.
- Locate the Java executables and run each one directly with
-version. Do not assume that the firstjavainPATHis the desired release. - Point each start script or systemd
ExecStartto the matching executable; keep each server’s world, plugins and logs in separate directories. - Change only one server at a time, with backups and a startup/connection test after the change.
/opt/jdk-25/bin/java -version
/opt/jdk-21/bin/java -version
Why this matters
The paths above are examples only: they must be replaced with actual files installed on your system. A global update-alternatives change can unexpectedly affect unrelated Minecraft services.
How to verify the result
After restart, confirm the version and JVM launch arguments from each server’s own logs or process command line. A successful start does not replace plugin/mod compatibility testing.
Version and compatibility notes
Java 25 is documented for current Paper/Velocity guides, but Minecraft installations from other eras may have different requirements. Always check the exact release before choosing a JDK.
Official references
Related guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.