You can run PaperMC with JDK 8 by downloading the specific legacy Java release, configuring your server startup script to point directly to that executable, and ensuring your operating system environment variables are correctly set. This approach allows you to maintain compatibility with older plugins while using the high-performance PaperMC server software, provided you handle the installation paths carefully to avoid conflicts with newer Java versions.
Understanding Java Compatibility
PaperMC is a fork of Spigot designed for performance and stability. While modern versions of Minecraft servers require Java 17 or higher, many legacy servers still rely on older plugin ecosystems that function best on Java 8. The core challenge is not running the server itself, but managing multiple Java installations on a single machine without causing path conflicts. You must ensure that the command line interface explicitly calls the JDK 8 binary rather than relying on the default system Java, which might be a newer version incompatible with your specific setup.
Locating the Correct Java Version
First, you need to acquire a valid JDK 8 distribution. Oracle no longer provides free public downloads for the latest updates, so most administrators turn to OpenJDK distributions like Adoptium (formerly AdoptOpenJDK) or Zulu. These vendors provide stable builds that are fully compatible with PaperMC. Once downloaded, extract the archive to a dedicated folder, such as
/opt/java/jdk-8 on Linux or
C:\Java\jdk-8 on Windows. Avoid installing it in system directories if possible, as this reduces permission issues during configuration.
Configuring Startup Scripts
The most reliable method to enforce JDK 8 usage is modifying your server startup script. Do not rely on global environment variables, as other applications may interfere with them. Instead, create a custom launch script that points directly to the
java.exe or
java binary inside your extracted JDK 8 folder.
For Linux and macOS users, create a file named
start.sh with the following content:
#!/bin/bash
# Path to your specific JDK 8 binary
JAVA_HOME="/path/to/your/jdk-8"
$JAVA_HOME/bin/java -Xms1G -Xmx2G -jar paper.jar nogui
For Windows users, create a
start.bat file:
@echo off
set JAVA_PATH=C:\Java\jdk-8\bin
%JAVA_PATH%\java.exe -Xms1G -Xmx2G -jar paper.jar nogui
pause
This explicit pathing ensures that even if your system
PATH variable prioritizes Java 17, your server will strictly use the JDK 8 executable. Always test the script by running it from the terminal to verify the correct version prints to the console upon startup.
Managing Environment Variables
While direct pathing is preferred, some tools or plugins may check the
JAVA_HOME environment variable. To support these edge cases, update your system settings temporarily or permanently. On Windows, navigate to System Properties > Environment Variables and add a new User variable named
JAVA_HOME pointing to the root JDK 8 directory. Update the
Path variable to include the
bin subdirectory. On Linux, you can export these variables in your shell profile (
.bashrc or
.zshrc):
export JAVA_HOME=/path/to/your/jdk-8
export PATH=$JAVA_HOME/bin:$PATH
Remember to reload your shell or restart your terminal session for changes to take effect. Verify the change by running
java -version; it should output details corresponding to the 1.8.x build you installed.
Plugin Compatibility Considerations
Running an outdated JDK requires vigilance regarding plugin compatibility. Many modern plugins have dropped support for Java 8 entirely. Before migrating your server, audit your plugin list. If a plugin fails to load with an error mentioning "UnsupportedClassVersionError," it means the plugin was compiled for a newer Java version and cannot run on JDK 8. In such cases, you must either find an alternative plugin or upgrade your server to a newer Java version. There is no workaround for bytecode incompatibility at the JVM level.
Maintaining Security and Stability
Using an older JDK introduces potential security risks since vendor support for critical patches may have ended. Regularly check for the latest available JDK 8 update from your chosen vendor. Additionally, ensure your server is behind a firewall and that you are not exposing ports unnecessarily. For more insights on maintaining robust server infrastructure, consider reviewing
Best Advice for Tech Support: Linux, Windows, and MacOS, which covers general troubleshooting principles applicable to any server environment.
Frequently Asked Questions
Can I run PaperMC with Java 17 instead?
Yes, modern PaperMC builds strongly recommend Java 17 or higher for optimal performance and access to the latest Minecraft features. However, if you are locked into an older plugin ecosystem, Java 8 remains a viable option despite being deprecated.
How do I check which Java version my server is using?
Check the server console logs immediately after startup. The first few lines typically display the Java version string. You can also run
java -version in the same directory where your start script resides to confirm the active interpreter.
What if a plugin throws an UnsupportedClassVersionError?
This error indicates the plugin class file was compiled with a newer Java version than the one currently running. You cannot force it to work on JDK 8; you must either update the plugin to a version supporting Java 8 or upgrade your server’s Java runtime.
Is it safe to use OpenJDK 8 from third-party vendors?
Yes, reputable vendors like Adoptium and Azul Zulu provide secure, community-maintained builds of OpenJDK 8. They receive regular security patches and are widely used in production environments for legacy systems.
Do I need to uninstall other Java versions?
No, you do not need to uninstall other Java versions. Using explicit paths in your startup script allows multiple Java versions to coexist peacefully on the same machine without interfering with each other.