(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.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@793757
13f79535-47bb-0310-9956-
ffa450edef68
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"
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
# 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
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.
# $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).
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
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"
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
# 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