User: user57 Date: 02/02/24 18:33:16 Modified: src/bin run.sh Log: o removed static init of njar proto Revision Changes Path 1.2 +41 -9 jboss-system/src/bin/run.sh Index: run.sh =================================================================== RCS file: /cvsroot/jboss/jboss-system/src/bin/run.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- run.sh 24 Feb 2002 10:24:33 -0000 1.1 +++ run.sh 25 Feb 2002 02:33:16 -0000 1.2 @@ -5,7 +5,7 @@ ## ## ### ====================================================================== ### -### $Id: run.sh,v 1.1 2002/02/24 10:24:33 user57 Exp $ ### +### $Id: run.sh,v 1.2 2002/02/25 02:33:16 user57 Exp $ ### DIRNAME=`dirname $0` PROGNAME=`basename $0` @@ -14,8 +14,15 @@ # # Helper to complain. # -die() { +warn() { echo "${PROGNAME}: $*" +} + +# +# Helper to puke. +# +die() { + warn $* exit 1 } @@ -44,6 +51,17 @@ fi export JBOSS_HOME +# Setup Profiler +useprofiler=false +if [ "x$PROFILER" != "x" ]; then + if [ -r "$PROFILER" ]; then + . $PROFILER + useprofiler=true + else + die "Profiler file not found: $PROFILER" + fi +fi + # Setup the JVM if [ "x$JAVA_HOME" != "x" ]; then JAVA="$JAVA_HOME/bin/java" @@ -52,13 +70,21 @@ fi # Setup the classpath -JBOSS_BOOT_CLASSPATH="$JBOSS_HOME/bin/run.jar" +runjar="$JBOSS_HOME/bin/run.jar" +if [ ! -f $runjar ]; then + die "Missing required file: $runjar" +fi +JBOSS_BOOT_CLASSPATH="$runjar" # Include the JDK javac compiler for JSP pages. The default is for a Sun JDK # compatible distribution which JAVA_HOME points to if [ "x$JAVAC_JAR" = "x" ]; then JAVAC_JAR="$JAVA_HOME/lib/tools.jar" fi +if [ ! -f "$JAVAC_JAR" ]; then + warn "Missing file: $JAVAC_JAR" + warn "Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE." +fi if [ "x$JBOSS_CLASSPATH" = "x" ]; then JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR" @@ -67,7 +93,9 @@ fi # Check for SUN(tm) JVM w/ HotSpot support -HAS_HOTSPOT=`$JAVA -version 2>&1 | $GREP HotSpot` +if [ "x$HAS_HOTSPOT" = "x" ]; then + HAS_HOTSPOT=`$JAVA -version 2>&1 | $GREP HotSpot` +fi # If JAVA_OPTS is not set and the JVM is HOTSPOT enabled, then the server mode if [ "x$JAVA_OPTS" = "x" -a "x$HAS_HOTSPOT" != "x" ]; then @@ -106,8 +134,12 @@ # Make sure we are in the correctly directory cd "$startdir" -# Execute the JVM -exec $JAVA \ - $JAVA_OPTS \ - -classpath "$JBOSS_CLASSPATH" \ - org.jboss.Main "$@" +if $useprofiler; then + # Hand over control to profiler + runProfiler +else + # Execute the JVM + exec $JAVA $JAVA_OPTS \ + -classpath "$JBOSS_CLASSPATH" \ + org.jboss.Main "$@" +fi \ No newline at end of file
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development