Author: kkolinko
Date: Tue Jul 14 00:01:01 2009
New Revision: 793757
URL: http://svn.apache.org/viewvc?rev=793757&view=rev
Log:
1. Ensure that any user defined CLASSPATH variables are not used on startup
(as is already implemented since rev.303663),
but now allow them to be specified in setenv.sh, in rare case when it is needed.
2. When preparing the CLASSPATH, do not treat the "debug" command specially,
because jdb does not need the tools.jar file.
3. Remove some wrong quotes in tool-wrapper.bat.
Modified:
tomcat/trunk/bin/catalina.bat
tomcat/trunk/bin/catalina.sh
tomcat/trunk/bin/setclasspath.bat
tomcat/trunk/bin/setclasspath.sh
tomcat/trunk/bin/tool-wrapper.bat
tomcat/trunk/bin/tool-wrapper.sh
Modified: tomcat/trunk/bin/catalina.bat
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.bat?rev=793757&r1=793756&r2=793757&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.bat (original)
+++ tomcat/trunk/bin/catalina.bat Tue Jul 14 00:01:01 2009
@@ -88,6 +88,10 @@
goto end
:okHome
+rem Ensure that any user defined CLASSPATH variables are not used on startup,
+rem but allow them to be specified in setenv.bat, in rare case when it is
needed.
+set CLASSPATH=
+
rem Get standard environment variables
if "%CATALINA_BASE%" == "" goto gotSetenvHome
if exist "%CATALINA_BASE%\bin\setenv.bat" call "%CATALINA_BASE%\bin\setenv.bat"
@@ -107,6 +111,8 @@
if errorlevel 1 goto end
rem Add on extra jar file to CLASSPATH
+rem Note that there are no quotes as we do not want to introduce random
+rem quotes into the CLASSPATH
if "%CLASSPATH%" == "" goto emptyClasspath
set CLASSPATH=%CLASSPATH%;
:emptyClasspath
Modified: tomcat/trunk/bin/catalina.sh
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=793757&r1=793756&r2=793757&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.sh (original)
+++ tomcat/trunk/bin/catalina.sh Tue Jul 14 00:01:01 2009
@@ -103,6 +103,10 @@
# Only set CATALINA_HOME if not already set
[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
+# Ensure that any user defined CLASSPATH variables are not used on startup,
+# but allow them to be specified in setenv.sh, in rare case when it is needed.
+CLASSPATH=
+
if [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then
. "$CATALINA_BASE"/bin/setenv.sh
elif [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
Modified: tomcat/trunk/bin/setclasspath.bat
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.bat?rev=793757&r1=793756&r2=793757&view=diff
==============================================================================
--- tomcat/trunk/bin/setclasspath.bat (original)
+++ tomcat/trunk/bin/setclasspath.bat Tue Jul 14 00:01:01 2009
@@ -67,14 +67,6 @@
set JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed
:gotEndorseddir
-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 ""%1"" == ""debug"" 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.
rem Also note the quoting as JAVA_HOME may contain spaces.
Modified: tomcat/trunk/bin/setclasspath.sh
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.sh?rev=793757&r1=793756&r2=793757&view=diff
==============================================================================
--- tomcat/trunk/bin/setclasspath.sh (original)
+++ tomcat/trunk/bin/setclasspath.sh Tue Jul 14 00:01:01 2009
@@ -21,9 +21,6 @@
# $Id$
# -----------------------------------------------------------------------------
-# First clear out the user classpath
-CLASSPATH=
-
# Make sure prerequisite environment variables are set
if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
# Bugzilla 37284 (reviewed).
@@ -101,13 +98,6 @@
JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
fi
-# Set standard CLASSPATH
-if [ "$1" = "debug" ] ; then
- if [ -f "$JAVA_HOME"/lib/tools.jar ]; then
- CLASSPATH="$JAVA_HOME"/lib/tools.jar
- fi
-fi
-
# OSX hack to CLASSPATH
JIKESPATH=
if [ `uname -s` = "Darwin" ]; then
Modified: tomcat/trunk/bin/tool-wrapper.bat
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/tool-wrapper.bat?rev=793757&r1=793756&r2=793757&view=diff
==============================================================================
--- tomcat/trunk/bin/tool-wrapper.bat (original)
+++ tomcat/trunk/bin/tool-wrapper.bat Tue Jul 14 00:01:01 2009
@@ -45,6 +45,10 @@
goto end
:okHome
+rem Ensure that any user defined CLASSPATH variables are not used on startup,
+rem but allow them to be specified in setenv.bat, in rare case when it is
needed.
+set CLASSPATH=
+
rem Get standard environment variables
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
@@ -58,11 +62,13 @@
call "%CATALINA_HOME%\bin\setclasspath.bat"
rem Add on extra jar files to CLASSPATH
+rem Note that there are no quotes as we do not want to introduce random
+rem quotes into the CLASSPATH
if "%CLASSPATH%" == "" goto noclasspath
-set
CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\lib\servlet-api.jar
-goto :okclasspath
+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
+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
Modified: tomcat/trunk/bin/tool-wrapper.sh
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/tool-wrapper.sh?rev=793757&r1=793756&r2=793757&view=diff
==============================================================================
--- tomcat/trunk/bin/tool-wrapper.sh (original)
+++ tomcat/trunk/bin/tool-wrapper.sh Tue Jul 14 00:01:01 2009
@@ -55,6 +55,11 @@
# Get standard environment variables
PRGDIR=`dirname "$PRG"`
CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
+
+# Ensure that any user defined CLASSPATH variables are not used on startup,
+# but allow them to be specified in setenv.sh, in rare case when it is needed.
+CLASSPATH=
+
if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
. "$CATALINA_HOME"/bin/setenv.sh
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]