Varuna:

The batch file checks if there is an environmental variable called
CATALINA_HOME" set. If it is not set, it creates the Environmental variable
set to the directory, CURRENT_DIR is set to. Then it

Then it checks for the batch file, catalina.bat, in "%CATALINA_HOME%\bin".
If it is there, the execution branches to :okHome.

venki


On 7/30/07, Varuna Seneviratna <[EMAIL PROTECTED]> wrote:
>
> Can you please explain the following
> rem Guess CATALINA_HOME if not defined
> set CURRENT_DIR=%cd%
> if not "%CATALINA_HOME%" == "" goto gotHome  //What is meant by this, Does
> it mean if Catalina Home is not equal to "" then
> CATALINA_HOME=%CURRENT_DIR%                   //what is the need to
> execute CATALINA_HOME=%CURRENT_DIR%
> if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome          //What is
> indicated by okHome, actually what does this code says
> cd ..
> set CATALINA_HOME=%cd%
> cd %CURRENT_DIR%
> :gotHome
> if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
> echo The CATALINA_HOME environment variable is not defined correctly
> echo This environment variable is needed to run this program
> goto end
> :okHome
>
> rem Get standard environment variables
> if exist "%CATALINA_HOME%\bin\setenv.bat" call
> "%CATALINA_HOME%\bin\setenv.bat"
>

Reply via email to