# Set juli LogManager if it is present
if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote.port=9009
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote.authenticate=false
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote.ssl=false
JAVA_OPTS="$JAVA_OPTS "-agentlib:jprofilerti=port=8849
JAVA_OPTS="$JAVA_OPTS "-Xbootclasspath/a:/opt/jprofiler5/bin/agent.jar
JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
fi
if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote.port=9009
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote.authenticate=false
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote.ssl=false
JAVA_OPTS="$JAVA_OPTS "-agentlib:jprofilerti=port=8849
JAVA_OPTS="$JAVA_OPTS "-Xbootclasspath/a:/opt/jprofiler5/bin/agent.jar
JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
fi
我曾经用过的一段有用的tomcat启动脚本,catalina.sh 文件的配置,在使用jconsloe等工具的时候需要在tomcat的启动参数中增加一些参数,上面是一个经过验证的例子。