Skip to content

Instantly share code, notes, and snippets.

@Phoenix616
Last active April 19, 2018 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Phoenix616/92cd1bf9c2a3ac880b7c272f325ecb0f to your computer and use it in GitHub Desktop.
Save Phoenix616/92cd1bf9c2a3ac880b7c272f325ecb0f to your computer and use it in GitHub Desktop.
Simple batch script to both create a version independent folder and to update the paths (system path requires admin rights). This needs to be run in the folder where the JDK (or JRE) is in.
set /p version="Enter the Java minor version: "
rm jdk1.8.0
mklink /J jdk1.8.0 jdk1.8.0_%version%
SETX JAVA_HOME "%~dp0jdk1.8.0_%version%"
SETX JAVA_HOME /m "%~dp0jdk1.8.0_%version%"
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment