Set java environment variable value with bat command forever
I am writing a bat script to set java path to envirnment variable. I am using the following command to set the path -
setx PATH=%jdkDirDest%\bin;%PATH%. setx PATH=%playDirDest%;%PATH%. set PATH=%jdkDirDest%\bin;%PATH%. set PATH=%playDirDest%;%PATH%.
It works great when I am working with the current session. But what happens if I close the current command line and reopen and run the following command
java -version
javac etc.
Shows that there is no java version on this system.
Can anyone tell me what code I am using to set this environment path to my match using bat command.
** I need a bat command.
Thanks to Advanced.
+3
source to share