To run PaperMC with JDK 8 on a PC where JDK 17 and 21 are installed, you can create a separate environment for JDK 8. Here's a step-by-step guide:
-
Install Oracle JDK 8:
- Download the JDK 8 installation package from the official Oracle website.
- Run the installer and follow the on-screen instructions.
-
Create a separate environment for JDK 8:
- Open the Start menu and search for "Environment Variables."
- Click on "Edit the system environment variables."
- In the System Properties window, click on the "Advanced" button.
- Under the "Advanced" tab, click on the "Environment Variables" button.
- In the "System Variables" section, find the
PATHvariable, select it, and click on "Edit." - In the "Edit environment variable" window, add the path to the JDK 8
bindirectory at the beginning of the variable value, separated by a semicolon (;). - Click "OK" to save the changes.
-
Run PaperMC with JDK 8:
- Navigate to the PaperMC directory.
- Run the PaperMC command, specifying the JDK 8 path if necessary:
java -jar papermc.jar - If you need to specify the JDK 8 path, use the following command:
/path/to/jdk8/bin/java -jar papermc.jar
References:
- Oracle JDK 8 Download: https://www.oracle.com/java/technologies/javase-jdk8-downloads.html
Articles:
- How to Install JDK on Windows: https://www.javatpoint.com/how-to-install-jdk-on-windows
- Setting Path Variable in Windows: https://www.javatpoint.com/how-to-set-path-variable-in-windows
Online Resources:
- Setting the PATH environment variable: https://docs.microsoft.com/en-us/windows/win32/environment/environment-variables#path-environment-variable
- How to Run a Java Program with a Specific JDK: https://www.baeldung.com/java-run-program-specific-jdk