These lines of code will get the JDK path from registry:
set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
set Cmd=reg query "%KeyName%" /s
for /f "tokens=2*" %%i in ('%Cmd% ^| find "JavaHome"') do set JVM_HOME=%%j
echo Path is : %JVM_HOMPublish PostE%
No comments:
Post a Comment