craigmcc 01/08/24 12:08:15
Modified: catalina/src/bin catalina.sh
Log:
Make it possible to start Catalina under a JPDA debugging environment. If
you execute
$CATALINA_HOME/bin/catalina.sh jpda start
the options in the JPDA_OPTS environment variable are added to those
specified by CATALINA_OPTS to enable debugging. A convenient default
value for JPDA_OPTS is made available if you do not specify it.
Submitted by: Henning P. Schmiedehausen <[EMAIL PROTECTED]>,
Jon Stevens <[EMAIL PROTECTED]>
Revision Changes Path
1.16 +15 -1 jakarta-tomcat-4.0/catalina/src/bin/catalina.sh
Index: catalina.sh
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- catalina.sh 2001/07/01 22:58:04 1.15
+++ catalina.sh 2001/08/24 19:08:15 1.16
@@ -12,7 +12,11 @@
#
# JAVA_HOME Must point at your Java Development Kit installation.
#
-# $Id: catalina.sh,v 1.15 2001/07/01 22:58:04 jon Exp $
+# JPDA_OPTS (Optional) Java runtime options used when the "jpda start"
+# command is executed. Defaults to
+# "-classic -Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
+#
+# $Id: catalina.sh,v 1.16 2001/08/24 19:08:15 craigmcc Exp $
# -----------------------------------------------------------------------------
@@ -45,6 +49,10 @@
CATALINA_OPTS=""
fi
+if [ -z "$JPDA_OPTS" ] ; then
+ JPDA_OPTS="-classic -Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
+fi
+
if [ -z "$JAVA_HOME" ] ; then
echo You must set JAVA_HOME to point at your Java Development Kit installation
exit 1
@@ -70,6 +78,11 @@
# ----- Execute The Requested Command -----------------------------------------
+if [ "$1" = "jpda" ] ; then
+ CATALINA_OPTS="${CATALINA_OPTS} ${JPDA_OPTS}"
+ shift
+fi
+
if [ "$1" = "debug" ] ; then
shift
@@ -160,6 +173,7 @@
echo " debug Start Catalina in a debugger"
echo " debug -security Debug Catalina with a security manager"
echo " env Set up environment variables that would be used"
+ echo " jpda start Start Catalina under JPDA debugger"
echo " run Start Catalina in the current window"
echo " run -security Start in the current window with security manager"
echo " start Start Catalina in a separate window"