Direct answer

Install the Java version required by your server software, open a new terminal, and run java -version. If Java is installed but the command is still missing, fix the system PATH or configure your panel/container to use the correct runtime.

Current Paper requirement

Paper’s current documentation recommends Java 21 for Paper 1.20 through 1.21.11 and Java 25 for Paper 26.1 and newer. Older server lines can require older Java releases, so check the exact version table rather than always installing the newest Java.

Verify what actually runs

java -version

If the output is not the version you installed, another Java executable is earlier in PATH. Close and reopen the terminal after installation. On managed panels and Docker, the selected server image may control Java independently from the host OS.

Use an absolute Java path when necessary

Targeted diagnosis: In Windows PowerShell, run where.exe java and java -version; on Linux, use command -v java and java -version. If no executable resolves, install a compatible JDK/JRE or select the Java path exposed by your server host.

A startup script can call a specific Java executable by full path. This is useful on systems that intentionally keep multiple Java versions for different Minecraft servers.

Fix and verify: When multiple Java versions are installed, invoke the intended executable by full path in the startup script rather than assuming PATH points to it. Restart the terminal or service after environment changes and compare the reported Java version with your server software requirements.

Do not copy Java from the Minecraft Launcher blindly

The desktop launcher’s bundled runtime is managed for the client. A dedicated server should use a supported system/panel runtime appropriate to that server version.

Official references

These references were checked while preparing this fix. Version-specific behavior can change, so use the project documentation for your exact release when a detail differs.

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