-
Clone the repo
git clone https://github.com/abhivemp/switchjdk.git
-
Open your environmental variables. Under your system variables, create a
JAVA_HOME
variable. This variable needs to hold the path to one of your JDKs. Note: This JDK version needs to be the same in your user variables as well -
Make sure your second JDK version is installed in the right place. Note: It's usually in your
C:\Program Files\Java\jdk-10
-
Change the paths of both JDK versions and rename the files accordingly
-
You can now run the batch script by their name.