I want to check whether JAVA_HOME is present in environment or not
So I wrote the below script a.bat
if "%JAVA_HOME%" == ""
(
echo Enter path to JAVA_HOME:
set /p javahome=
)
if not "%JAVA_HOME%" == ""
(
echo %JAVA_HOME%
)
It shows "The syntax of the command is incorrect" where am i going wrong?