tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r791331 - in /tomcat/trunk/bin: catalina.bat catalina.sh setclasspath.bat setclasspath.sh
Date Sun, 05 Jul 2009 22:46:51 GMT
Author: markt
Date: Sun Jul  5 22:46:51 2009
New Revision: 791331

URL: http://svn.apache.org/viewvc?rev=791331&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=39194
Align classpath for all platforms:
 - only add tools.jar to the classpath when required
 - document optional javac argument for catalina.sh|bat
 - make sure javac without generating warnings on start
Include a patch for setclasspath.sh by Jason Brittain  

Modified:
    tomcat/trunk/bin/catalina.bat
    tomcat/trunk/bin/catalina.sh
    tomcat/trunk/bin/setclasspath.bat
    tomcat/trunk/bin/setclasspath.sh

Modified: tomcat/trunk/bin/catalina.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.bat?rev=791331&r1=791330&r2=791331&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.bat (original)
+++ tomcat/trunk/bin/catalina.bat Sun Jul  5 22:46:51 2009
@@ -106,8 +106,13 @@
 call "%CATALINA_HOME%\bin\setclasspath.bat" %1
 if errorlevel 1 goto end
 
+if "%1" == "javac" shift
+ 
 rem Add on extra jar files to CLASSPATH
-set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
+if "%CLASSPATH%" == "" goto emptyClasspath
+set CLASSPATH=%CLASSPATH%;
+:emptyClasspath
+set CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar
 
 if not "%CATALINA_BASE%" == "" goto gotBase
 set CATALINA_BASE=%CATALINA_HOME%
@@ -172,7 +177,10 @@
 if ""%1"" == ""stop"" goto doStop
 if ""%1"" == ""version"" goto doVersion
 
-echo Usage:  catalina ( commands ... )
+echo Usage:  catalina [javac] ( commands ... )
+echo optional arguments:
+echo   javac             Adds tools.jar to the classpath so javac is available
+echo                       as a compiler
 echo commands:
 echo   debug             Start Catalina in a debugger
 echo   debug -security   Debug Catalina with a security manager

Modified: tomcat/trunk/bin/catalina.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=791331&r1=791330&r2=791331&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.sh (original)
+++ tomcat/trunk/bin/catalina.sh Sun Jul  5 22:46:51 2009
@@ -150,7 +150,10 @@
 fi
 
 # Add on extra jar files to CLASSPATH
-CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar
+if [ ! -z "$CLASSPATH" ] ; then
+  CLASSPATH="$CLASSPATH":
+fi
+CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar
 
 if [ -z "$CATALINA_BASE" ] ; then
   CATALINA_BASE="$CATALINA_HOME"
@@ -345,7 +348,10 @@
 
 else
 
-  echo "Usage: catalina.sh ( commands ... )"
+  echo "Usage: catalina.sh [javac] ( commands ... )"
+  echo "optional arguments:"
+  echo "  javac             Adds tools.jar to the classpath so javac is"
+  echo "                      available as a compiler"
   echo "commands:"
   if $os400; then
     echo "  debug             Start Catalina in a debugger (not available on OS400)"

Modified: tomcat/trunk/bin/setclasspath.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.bat?rev=791331&r1=791330&r2=791331&view=diff
==============================================================================
--- tomcat/trunk/bin/setclasspath.bat (original)
+++ tomcat/trunk/bin/setclasspath.bat Sun Jul  5 22:46:51 2009
@@ -70,9 +70,14 @@
 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%\lib\tools.jar" goto noJavac
+if not exist "%JAVA_HOME%\lib\tools.jar" goto noJavac2
+if not ""%1"" == ""debug"" goto noJavac1
 set CLASSPATH=%JAVA_HOME%\lib\tools.jar
-:noJavac
+goto noJavac2
+:noJavac1
+if not ""%1"" == ""javac"" goto noJavac2
+set CLASSPATH=%JAVA_HOME%\lib\tools.jar
+:noJavac2
 
 rem Set standard command for invoking Java.
 rem Note that NT requires a window name argument when using start.

Modified: tomcat/trunk/bin/setclasspath.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.sh?rev=791331&r1=791330&r2=791331&view=diff
==============================================================================
--- tomcat/trunk/bin/setclasspath.sh (original)
+++ tomcat/trunk/bin/setclasspath.sh Sun Jul  5 22:46:51 2009
@@ -112,6 +112,9 @@
 if [ "$1" = "debug" -o "$1" = "javac" ] ; then
   if [ -f "$JAVA_HOME"/lib/tools.jar ]; then
     CLASSPATH="$JAVA_HOME"/lib/tools.jar
+    if [ "$1" = "javac" ] ; then
+      shift
+    fi
   fi
 fi
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message