From Xusage.txt
-Xmixed mixed mode execution (default)
-Xint interpreted mode execution only
-Xbootclasspath:<directories and zip/jar files separated by ;>
set search path for bootstrap classes and resources
-Xbootclasspath/a:<directories and zip/jar files separated by ;>
append to end of bootstrap class path
-Xbootclasspath/p:<directories and zip/jar files separated by ;>
prepend in front of bootstrap class path
-Xnoclassgc disable class garbage collection
-Xincgc enable incremental garbage collection
-Xloggc:<file> log GC status to a file with time stamps
-Xbatch disable background compilation
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
-Xss<size> set java thread stack size
-Xprof output cpu profiling data
-Xfuture enable strictest checks, anticipating future default
-Xrs reduce use of OS signals by Java/VM (see documentation)
-Xcheck:jni perform additional checks for JNI functions
-Xshare:off do not attempt to use shared class data
-Xshare:auto use shared class data if possible (default)
-Xshare:on require using shared class data, otherwise fail.
The -X options are non-standard and subject to change without notice.
Usage
if [ -z "$JAVA_MEM" ];then
JAVA_MEM="-Xms1G -Xmx6G -Xss512K"
fi
if [ -z "$JAVA_GC" ];then
JAVA_GC="-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2 -XX:InitiatingHeapOccupancyPercent=70"
fi
if [ -z "$JAVA_OPTION" ];then
JAVA_OPTION=""
fi
JAVA_OPTS="-server -Dfile.encoding=UTF8 -Djava.security.egd=file:/dev/./urandom $JAVA_MEM $JAVA_GC $JAVA_OPTION"
echo "JAVA_MEM=$JAVA_MEM"
echo "JAVA_GC=$JAVA_GC"
echo "JAVA_OPTION=$JAVA_OPTION"
echo "JAVA_OPTS=$JAVA_OPTS"
echo "running", $PROJECTNAME, "..."
#exec java $JAVA_OPTS -jar $JARNAME --cas.standalone.configurationDirectory=/data0/cas-config/app/config
exec java $JAVA_OPTS -jar $JARNAME