java 启动参数

!/bin/sh

BASEDIR=dirname $0/..
BASEDIR=(cd "$BASEDIR"; pwd)

If a specific java binary isn't specified search for the standard 'java' binary

if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then

if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
  # IBM's JDK on AIX uses strange locations for the executables
  JAVACMD="$JAVA_HOME/jre/sh/java"
else
  JAVACMD="$JAVA_HOME/bin/java"
fi

else

JAVACMD=`which java`

fi
fi

CLASSPATH="$BASEDIR"/conf:"$BASEDIR"/lib/*
LOGDIR="$BASEDIR/log/"

echo "$CLASSPATH"

if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
exit 1
fi

if [ -z "$OPTS_MEMORY" ] ; then

OPTS_MEMORY= OPTS_MEMORY="-server -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=60 -XX:ParallelGCThreads=1 -XX:ConcGCThreads=1 -XX:CMSFullGCsBeforeCompaction=5  -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCDateStamps -XX:+TraceClassLoading -XX:+TraceClassUnloading -XX:-OmitStackTraceInFastThrow -XX:+PrintTenuringDistribution -verbose:gc -Xloggc:/export/Logs/ar-gc.log"

fi

JTRACE_OPTS=" -javaagent:/export/servers/jtrace-agent/pinpoint-bootstrap-1.6.2.jar -Dpinpoint.applicationName= "

nohup "$JAVACMD" $JAVA_OPTS \
$JTRACE_OPTS \
$OPTS_MEMORY \
-classpath "$CLASSPATH" \
-Dbasedir="$BASEDIR" \
-Dfile.encoding="UTF-8" \
com.jd.cprt.CprtLauncher \

/export/Logs/nohup.log 2>&1 &

上一篇:RAMCloud:内存云存储的内存分配机制


下一篇:Guava 是个风火轮之基础工具(4)