1
Hi everybody!
I recently made 2 different minecraft server, one is spigot 1.17, and the other is forge 1.16.5.
I want to host both of them (not at the same time), but one at a time, and the problem is that the 1.16.5 runs on Java 8, and the 1.17 runs on Java 16 and above.
But I can't host both the servers, because windows associates all jar files to the java that is installed earlier, so my question is:
Can i associate different server files to different java versions, and if yes, then how?
Thanks,
TheLevi
I recently made 2 different minecraft server, one is spigot 1.17, and the other is forge 1.16.5.
I want to host both of them (not at the same time), but one at a time, and the problem is that the 1.16.5 runs on Java 8, and the 1.17 runs on Java 16 and above.
But I can't host both the servers, because windows associates all jar files to the java that is installed earlier, so my question is:
Can i associate different server files to different java versions, and if yes, then how?
Thanks,
TheLevi
1
So assuming you have a windows .bat boot file, example:
java -Xmx5G -Xms5G -jar paper-1.18.jar nogui
You would just replace the "java" part at the begging to whatever your java version path is, example:
"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" -Xmx5G -Xms5G -jar paper-1.18.jar nogui
You can have multiple versions of java installed on one computer.
java -Xmx5G -Xms5G -jar paper-1.18.jar nogui
You would just replace the "java" part at the begging to whatever your java version path is, example:
"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" -Xmx5G -Xms5G -jar paper-1.18.jar nogui
You can have multiple versions of java installed on one computer.
