Don add tools.jar if it doesn exist.
authorjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 9 Feb 2007 10:22:58 +0000 (10:22 +0000)
committerjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 9 Feb 2007 10:22:58 +0000 (10:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@505241 13f79535-47bb-0310-9956-ffa450edef68

bin/setclasspath.bat
bin/tool-wrapper.bat

index 6e85ea4..52ae577 100755 (executable)
@@ -51,7 +51,9 @@ set JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed
 rem Set standard CLASSPATH
 rem Note that there are no quotes as we do not want to introduce random
 rem quotes into the CLASSPATH
+if not exist "%JAVA_HOME%\bin\tools.jar" goto noJavac
 set CLASSPATH=%JAVA_HOME%\lib\tools.jar
+:noJavac
 
 rem Set standard command for invoking Java.
 rem Note that NT requires a window name argument when using start.
index cb92e68..dea3d7e 100755 (executable)
@@ -43,7 +43,12 @@ set BASEDIR=%CATALINA_HOME%
 call "%CATALINA_HOME%\bin\setclasspath.bat"
 
 rem Add on extra jar files to CLASSPATH
+if "%CLASSPATH%" == "" goto noclasspath
 set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\lib\servlet-api.jar
+goto :okclasspath
+:noclasspath
+set CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\lib\servlet-api.jar
+:okclasspath
 
 rem Get remaining unshifted command line arguments and save them in the
 set CMD_LINE_ARGS=