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

  1. Identify the required Java major version for each specific server JAR, proxy and mod loader.
  2. Locate the Java executables and run each one directly with -version. Do not assume that the first java in PATH is the desired release.
  3. Point each start script or systemd ExecStart to the matching executable; keep each server’s world, plugins and logs in separate directories.
  4. 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

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000