Last active
September 9, 2023 20:31
-
-
Save aliahmadcse/d3da628d2de45f75a03937749b032002 to your computer and use it in GitHub Desktop.
change_java-version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set JAVA_HOME=C:\Users\Dell\.jdks\openjdk-17.0.2 | |
setx JAVA_HOME "%JAVA_HOME%" | |
set Path=%JAVA_HOME%\bin;%Path% | |
echo Java 17 activated as user default. | |
move c:\Users\Dell\.m2\*.xml c:\Users\Dell\.m2\settings | |
echo setting files moved inside successfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set JAVA_HOME=C:\Users\Dell\.jdks\openjdk-17.0.2 | |
setx JAVA_HOME "%JAVA_HOME%" /M | |
set Path=%JAVA_HOME%\bin;%Path% | |
echo Java 17 activated as system-wide default. | |
move c:\Users\Dell\.m2\*.xml c:\Users\Dell\.m2\settings | |
echo setting files moved inside successfully |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script manages the different versions of java on a windows device. Change place all these scripts in a directory and put this directory in the path for easy change of version.