Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Using JAVA_OPTS=" -sever" with jsvc on linux

Mariano

2004-06-10

Replies:

Hi all, i like to specify JAVA_OPTS=" -sever" with jsvc on linux Fedora Core
1. I use J2SDK 1.4.2_04-b05 and Tomcat 5.0.25.

Now i put a line into Tomcat.sh like JAVA_OPTS=" -sever ", but i don't know
if this is correct.

Tomcat.sh:

JAVA_HOME=/var/j2sdk
CATALINA_HOME=/var/tomcat
DAEMON_HOME=/var/tomcat/bin
TOMCAT_USER=tomcat
TMP_DIR=/var/tmp
JAVA_OPTS=" -server "
export JAVA_OPTS
CATALINA_OPTS="-Xms256m -Xmx256m -XX:PermSize=128m -XX:MaxPermSize=128m"
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
start)
  #
  # Start Tomcat
  #
  $DAEMON_HOME/jsvc \
  -user $TOMCAT_USER \
  -home $JAVA_HOME \
  -Dcatalina.home=$CATALINA_HOME \
  -Djava.io.tmpdir=$TMP_DIR \
  -outfile $CATALINA_HOME/logs/catalina.out \
  -errfile '&1' \
  $CATALINA_OPTS \
  -cp $CLASSPATH \
  #
  # To get a verbose JVM
  #-verbose \
  # To get a debug of jsvc.
  #-debug \
  ;;

stop)
  #
  # Stop Tomcat
  #
  PID=`cat /var/run/jsvc.pid`
  kill $PID
  ;;

*)
  echo "Usage tomcat.sh start/stop"
  exit 1;;
esac

Thanks.

Mariano L�pez
©2008 junlu.com - Jax Systems, LLC, U.S.A.