⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 run.sh

📁 《J2EE企业级应用开发》一书的配套源代码
💻 SH
字号:
#!/bin/sh### ====================================================================== #####                                                                          ####  JBoss Bootstrap Script                                                  ####                                                                          ##### ====================================================================== ###### $Id: run.sh,v 1.5.2.2 2002/11/13 21:32:28 starksm Exp $ ###DIRNAME=`dirname $0`PROGNAME=`basename $0`GREP="grep"## Helper to complain.#warn() {    echo "${PROGNAME}: $*"}## Helper to puke.#die() {    warn $*    exit 1}# OS specific support (must be 'true' or 'false').cygwin=false;darwin=false;case "`uname`" in    CYGWIN*)        cygwin=true        ;;    Darwin*)        darwin=true        ;;esac# For Cygwin, ensure paths are in UNIX format before anything is touchedif $cygwin ; then    [ -n "$JBOSS_HOME" ] &&        JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`    [ -n "$JAVA_HOME" ] &&        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`    [ -n "$JAVAC_JAR" ] &&        JAVAC_JAR=`cygpath --unix "$JAVAC_JAR"`fi# Setup JBOSS_HOMEif [ "x$JBOSS_HOME" = "x" ]; then    # get the full path (without any relative bits)    JBOSS_HOME=`cd $DIRNAME/..; pwd`fiexport JBOSS_HOME# Setup Profileruseprofiler=falseif [ "x$PROFILER" != "x" ]; then    if [ -r "$PROFILER" ]; then        . $PROFILER        useprofiler=true    else        die "Profiler file not found: $PROFILER"    fifi# Setup the JVMif [ "x$JAVA_HOME" != "x" ]; then    JAVA="$JAVA_HOME/bin/java"else    JAVA="java"fi# Setup the classpathrunjar="$JBOSS_HOME/bin/run.jar"if [ ! -f $runjar ]; then    die "Missing required file: $runjar"fiJBOSS_BOOT_CLASSPATH="$runjar"# Include the JDK javac compiler for JSP pages. The default is for a Sun JDK# compatible distribution which JAVA_HOME points toif [ "x$JAVAC_JAR" = "x" ]; then    JAVAC_JAR="$JAVA_HOME/lib/tools.jar"fiif [ ! -f "$JAVAC_JAR" ]; then   # MacOSX does not have a seperate tools.jar   if [ "$darwin" != "true" ]; then      warn "Missing file: $JAVAC_JAR"      warn "Unexpected results may occur.  Make sure JAVA_HOME points to a JDK and not a JRE."   fifiif [ "x$JBOSS_CLASSPATH" = "x" ]; then    JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"else    JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"fi# Check for SUN(tm) JVM w/ HotSpot supportif [ "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 modeif [ "x$JAVA_OPTS" = "x" -a "x$HAS_HOTSPOT" != "x" ]; then    # MacOS does not support -server flag    if [ "$darwin" != "true" ]; then        JAVA_OPTS="-server"    fifi# Setup JBoss sepecific propertiesJAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"# For Cygwin, switch paths to Windows format before running javaif $cygwin; then    JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`    JBOSS_CLASSPATH=`cygpath --path --windows "$JBOSS_CLASSPATH"`fi# Display our environmentecho "================================================================================"echo ""echo "  JBoss Bootstrap Environment"echo ""echo "  JBOSS_HOME: $JBOSS_HOME"echo ""echo "  JAVA: $JAVA"echo ""echo "  JAVA_OPTS: $JAVA_OPTS"echo ""echo "  CLASSPATH: $JBOSS_CLASSPATH"echo ""echo "================================================================================"echo ""if $useprofiler; then    # Hand over control to profiler    runProfilerelse    # Execute the JVM    exec "$JAVA" $JAVA_OPTS \            -classpath "$JBOSS_CLASSPATH" \            org.jboss.Main "$@"fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -