You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2009/07/17 12:52:17 UTC
svn commit: r795037 - in /tomcat/tc6.0.x/trunk: ./ STATUS.txt
bin/catalina.bat bin/catalina.sh bin/setclasspath.bat bin/setclasspath.sh
bin/tool-wrapper.bat bin/tool-wrapper.sh webapps/docs/changelog.xml
Author: markt
Date: Fri Jul 17 10:52:16 2009
New Revision: 795037
URL: http://svn.apache.org/viewvc?rev=795037&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=39194
Make classpath config consistent
Modified:
tomcat/tc6.0.x/trunk/ (props changed)
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/bin/catalina.bat
tomcat/tc6.0.x/trunk/bin/catalina.sh
tomcat/tc6.0.x/trunk/bin/setclasspath.bat
tomcat/tc6.0.x/trunk/bin/setclasspath.sh
tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat
tomcat/tc6.0.x/trunk/bin/tool-wrapper.sh
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc6.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 17 10:52:16 2009
@@ -1 +1 @@
-/tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,673796,673820,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,746384,746425,747834,747863,748344,750258,750291,750921,751286-751287,751289,751295,753039,757335,757774,758365,758596,758616,758664,759074,761601,762868,762929,762936-762937,763166,763183,763193,763228,763262,763298,763302,763325,763599,763611,763654,763681,763706,764985,764997,765662,768335,769979,770716,770809,770876,776921,776924,776935,776945,777464,77
7466,777576,777625,778379,778523-778524,781528,781779,782145,782791,783316,783696,783724,783756,783762,783766,783863,783934,784453,784602,784614,785381,785688,785768,785859,786468,786487,786490,786496,786667,787627,787770,787985,790405,791041,791184,791194,791243,791326,791328,791789,792740,793882
+/tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,673796,673820,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,746384,746425,747834,747863,748344,750258,750291,750921,751286-751287,751289,751295,753039,757335,757774,758365,758596,758616,758664,759074,761601,762868,762929,762936-762937,763166,763183,763193,763228,763262,763298,763302,763325,763599,763611,763654,763681,763706,764985,764997,765662,768335,769979,770716,770809,770876,776921,776924,776935,776945,777464,77
7466,777576,777625,778379,778523-778524,781528,781779,782145,782791,783316,783696,783724,783756,783762,783766,783863,783934,784453,784602,784614,785381,785688,785768,785859,786468,786487,786490,786496,786667,787627,787770,787985,790405,791041,791184,791194,791243,791326,791328,791789,792740,793372,793757,793882
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=795037&r1=795036&r2=795037&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jul 17 10:52:16 2009
@@ -126,18 +126,6 @@
+1: markt, kkolinko
-1:
-* Script improvement - alternative patch
- http://svn.apache.org/viewvc?rev=793372&view=rev (align platforms / bug 39194)
- +1: markt, rjung, kkolinko
- -1:
- kkolinko: It needs rev.793757 that I am proposing below. Otherwise the
- user isn't able to set CLASSPATH in setenv script.
-
-* Script improvement - additional patch
- http://svn.apache.org/viewvc?rev=793757&view=rev
- +1: kkolinko, markt, rjung
- -1:
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47478
https://svn.apache.org/viewcvs.cgi?view=rev&rev=791524
+1: fhanik, rjung, markt
Modified: tomcat/tc6.0.x/trunk/bin/catalina.bat
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/catalina.bat?rev=795037&r1=795036&r2=795037&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/bin/catalina.bat (original)
+++ tomcat/tc6.0.x/trunk/bin/catalina.bat Fri Jul 17 10:52:16 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"
@@ -106,8 +110,13 @@
call "%CATALINA_HOME%\bin\setclasspath.bat" %1
if errorlevel 1 goto end
-rem Add on extra jar files to CLASSPATH
-set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
+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
+set CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar
if not "%CATALINA_BASE%" == "" goto gotBase
set CATALINA_BASE=%CATALINA_HOME%
Modified: tomcat/tc6.0.x/trunk/bin/catalina.sh
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/catalina.sh?rev=795037&r1=795036&r2=795037&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/bin/catalina.sh (original)
+++ tomcat/tc6.0.x/trunk/bin/catalina.sh Fri Jul 17 10:52:16 2009
@@ -34,7 +34,7 @@
# $CATALINA_BASE/temp.
#
# JAVA_HOME Must point at your Java Development Kit installation.
-# Required to run the with the "debug" or "javac" argument.
+# Required to run the with the "debug" argument.
#
# JRE_HOME Must point at your Java Development Kit installation.
# Defaults to JAVA_HOME if empty.
@@ -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
@@ -150,7 +154,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"
@@ -201,7 +208,7 @@
echo "Using CATALINA_BASE: $CATALINA_BASE"
echo "Using CATALINA_HOME: $CATALINA_HOME"
echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
- if [ "$1" = "debug" -o "$1" = "javac" ] ; then
+ if [ "$1" = "debug" ] ; then
echo "Using JAVA_HOME: $JAVA_HOME"
else
echo "Using JRE_HOME: $JRE_HOME"
Modified: tomcat/tc6.0.x/trunk/bin/setclasspath.bat
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/setclasspath.bat?rev=795037&r1=795036&r2=795037&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/bin/setclasspath.bat (original)
+++ tomcat/tc6.0.x/trunk/bin/setclasspath.bat Fri Jul 17 10:52:16 2009
@@ -67,20 +67,11 @@
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
-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.
set _RUNJAVA="%JRE_HOME%\bin\java"
-set _RUNJAVAW="%JRE_HOME%\bin\javaw"
set _RUNJDB="%JAVA_HOME%\bin\jdb"
-set _RUNJAVAC="%JAVA_HOME%\bin\javac"
goto end
Modified: tomcat/tc6.0.x/trunk/bin/setclasspath.sh
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/setclasspath.sh?rev=795037&r1=795036&r2=795037&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/bin/setclasspath.sh (original)
+++ tomcat/tc6.0.x/trunk/bin/setclasspath.sh Fri Jul 17 10:52:16 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).
@@ -59,7 +56,7 @@
fi
# If we're running under jdb, we need a full jdk.
-if [ "$1" = "debug" -o "$1" = "javac" ] ; then
+if [ "$1" = "debug" ] ; then
if [ "$os400" = "true" ]; then
if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
echo "The JAVA_HOME environment variable is not defined correctly"
@@ -101,20 +98,6 @@
JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
fi
-# Set standard CLASSPATH
-if [ "$1" = "javac" ] ; then
- if [ ! -f "$JAVA_HOME"/lib/tools.jar ]; then
- echo "Can't find tools.jar in JAVA_HOME"
- echo "Need a JDK to run javac"
- exit 1
- fi
-fi
-if [ "$1" = "debug" -o "$1" = "javac" ] ; 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
@@ -131,4 +114,3 @@
if [ "$os400" != "true" ]; then
_RUNJDB="$JAVA_HOME"/bin/jdb
fi
-_RUNJAVAC="$JAVA_HOME"/bin/javac
Modified: tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat?rev=795037&r1=795036&r2=795037&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat (original)
+++ tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat Fri Jul 17 10:52:16 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/tc6.0.x/trunk/bin/tool-wrapper.sh
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/tool-wrapper.sh?rev=795037&r1=795036&r2=795037&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/bin/tool-wrapper.sh (original)
+++ tomcat/tc6.0.x/trunk/bin/tool-wrapper.sh Fri Jul 17 10:52:16 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
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=795037&r1=795036&r2=795037&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Jul 17 10:52:16 2009
@@ -193,6 +193,10 @@
</subsection>
<subsection name="Other">
<changelog>
+ <fix>
+ <bug>39194</bug>: Make classpath configuration consistent in the startup
+ scripts. (markt/kkolinko)
+ </fix>
<update>
Update Tomcat Windows service application (procrun) to version 2.0.5.
It contains a fix for issue <bug>41538</bug> (mturk)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org