Comment by layer8
3 months ago
JDKs are just a directory tree. Not sure what you mean on Windows, you simply unpack the JDKs to whatever directories you want, and set PATH and/or JAVA_HOME according to which you want to use, and/or switch them in your IDE.
The advantage of using a package manager like scoop or chocolatey is that you have a unified interface to manage multiple versions of JDK, and you can switch the default version system-wide on the fly, regardless of your IDE:
I also wrote a short guide on my website: https://raizensoft.com/tutorial/install-java-gamedev/
Thanks, but what does “the default version system-wide” mean, other than setting environment variables or replacing the JDK in a fixed location?
You can do that manually but it's tedious if you want to use multiple JDKs. Assuming you want to test two apps outside of an IDE, one only supports Java 8 API, and the other supports Java 21 API, you don't want to edit JAVA_HOME every time you switch back and forth between the two apps.
With scoop you can just launch the terminal and run `scoop reset [java-version]`