I am trying to access the value of TOMCAT_VER later on, but it appears as an empty string.
if exist "%_REALPATH%\tomcat-%TOMCAT_VER2%" (
set CATALINA_HOME=%_REALPATH%\tomcat-%TOMCAT_VER2%
set TOMCAT_VER=%TOMCAT_VER2%
echo "%TOMCAT_VER%"
) else if exist "%TOMCAT_VER2%" (
set CATALINA_HOME="%TOMCAT_VER2%"
set TOMCAT_VER="%TOMCAT_VER2%"
echo "%TOMCAT_VER%"
)
To further debug, I inserted an echo statement right below where it gets set, but it doesn't seem to work. With echo off disabled, I can see the statement showing these variables getting set, and yet I can't seem to print them out.