You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Larry Isaacs <La...@sas.com> on 2000/07/03 17:06:26 UTC

[PATCH] CLASSPATH entry containing space trips up tomcat.bat

If the CLASSPATH environment variable contains an entry containing a space, tomcat.bat will malfuction. The following patch encloses the %CP% environment variable in quotes: 

========== patch.txt ==========
--- tomcat.bat.orig	Mon Jul 03 03:30:58 2000
+++ tomcat.bat	Mon Jul 03 10:58:19 2000
@@ -76,39 +76,39 @@
 :startServer
 echo Starting Tomcat in new window
 if "%2" == "-security" goto startSecure
-start java %TOMCAT_OPTS% -classpath %CP% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
+start java %TOMCAT_OPTS% -classpath "%CP%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 :startSecure
 echo Starting Tomcat with a SecurityManager
-start java %TOMCAT_OPTS% -classpath %CP% -Djava.security.manager -Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %3 %4 %5 %6 %7 %8 %9
+start java %TOMCAT_OPTS% -classpath "%CP%" -Djava.security.manager -Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 :runServer
 rem Running Tomcat in this window
 if "%2" == "-security" goto runSecure
-java %TOMCAT_OPTS% -classpath %CP% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
+java %TOMCAT_OPTS% -classpath "%CP%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 :runSecure
 rem Running Tomcat with a SecurityManager
-java %TOMCAT_OPTS% -classpath %CP% -Djava.security.manager -Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %3 %4 %5 %6 %7 %8 %9
+java %TOMCAT_OPTS% -classpath "%CP%" -Djava.security.manager -Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 :stopServer
 rem Stopping the Tomcat Server
-java %TOMCAT_OPTS% -classpath %CP% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9
+java %TOMCAT_OPTS% -classpath "%CP%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 :runAnt
 rem Run ANT in Tomcat's Environment
 set CP=%CP%;%TOMCAT_HOME%\lib\ant.jar
-java %ANT_OPTS% -classpath %CP% -Dant.home="%TOMCAT_HOME%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tools.ant.Main %2 %3 %4 %5 %6 %7 %8 %9
+java %ANT_OPTS% -classpath "%CP%" -Dant.home="%TOMCAT_HOME%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tools.ant.Main %2 %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 :runJspc
 rem Run JSPC in Tomcat's Environment
-java %JSPC_OPTS% -classpath %CP% -Dtomcat.home="%TOMCAT_HOME%" org.apache.jasper.JspC %2 %3 %4 %5 %6 %7 %8 %9
+java %JSPC_OPTS% -classpath "%CP%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.jasper.JspC %2 %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 ===========================

Larry

__________
Larry Isaacs		
Larry.Isaacs@sas.com
SAS Institute Inc.