I write a bat script to set java path in envirnment variable. I use following command to set path -
setx PATH=%jdkDirDest%\bin;%PATH%.
setx PATH=%playDirDest%;%PATH%.
set PATH=%jdkDirDest%\bin;%PATH%.
set PATH=%playDirDest%;%PATH%.
It works fine when I am working with current session But what happen if I closed current command prompt and again open and run following command
java -version
javac etc.
It shows no java version is intall in this system
Can any one sugest me what code I use to set these environment path permanently to my matchine using bat command.
** I need bat command.