Changeset 14723

Show
Ignore:
Timestamp:
23.10.2007 16:57:02 (12 years ago)
Author:
qq6
Message:

looking for the JRE home first then the JAVA_home when running tomcat

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/branches/3.03/resources/tomcat/setclasspath.bat

    r11288 r14723  
    66 
    77rem Make sure prerequisite environment variables are set 
    8 if not "%JAVA_HOME%" == "" goto gotJavaHome 
    9 echo The JAVA_HOME environment variable is not defined 
    10 echo This environment variable is needed to run this program 
     8if not "%JAVA_HOME%" == "" goto gotJdkHome 
     9if not "%JRE_HOME%" == "" goto gotJreHome 
     10echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 
     11echo At least one of these environment variable is needed to run this program 
    1112goto exit 
    12 :gotJavaHome 
     13 
     14:gotJreHome 
     15if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome 
     16if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome 
     17if not ""%1"" == ""debug"" goto okJavaHome 
     18echo JAVA_HOME should point to a JDK in order to run in debug mode. 
     19goto exit 
     20 
     21:gotJdkHome 
    1322if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome 
    1423if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome 
    1524if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome 
    1625if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome 
     26if not "%JRE_HOME%" == "" goto okJavaHome 
     27set JRE_HOME=%JAVA_HOME% 
    1728goto okJavaHome 
     29 
    1830:noJavaHome 
    1931echo The JAVA_HOME environment variable is not defined correctly 
     
    4557rem Note that NT requires a window name argument when using start. 
    4658rem Also note the quoting as JAVA_HOME may contain spaces. 
    47 set _RUNJAVA="%JAVA_HOME%\bin\java" 
    48 set _RUNJAVAW="%JAVA_HOME%\bin\javaw" 
     59set _RUNJAVA="%JRE_HOME%\bin\java" 
     60set _RUNJAVAW="%JRE_HOME%\bin\javaw" 
    4961set _RUNJDB="%JAVA_HOME%\bin\jdb" 
    5062set _RUNJAVAC="%JAVA_HOME%\bin\javac"