I\'m trying to setup my setenv.sh
on Ubuntu 12/Tomcat 7.
Tomcat has been installed with apt-get
I\'ve tried to create a multiline JAVA_OPTS
variabl
You'd be better off with:
JAVA_OPTS="$JAVA_OPTS -server "
JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx512m"
export JAVA_OPTS
Wound up using something similar to Marc, but with escapes for spaces in property definitions
export JAVA_OPTS="$JAVA_OPTS \
-DFOO=\"bar bar\" \
-DBAZ=\"bar2 bar2\" "
Hmm, deleted the whole file and recreated it, and now it works..... Now using this style
export JAVA_OPTS="$JAVA_OPTS\
-server\
-Xms704m\
-Xmx704m\
-XX:OnOutOfMemoryError=/usr/share/scripts/on_server_crash.sh\
-XX:+HeapDumpOnOutOfMemoryError\
-XX:HeapDumpPath=/var/log/tomcat7\
-XX:MaxPermSize=128m\
-XX:MaxNewSize=256m\
-XX:NewSize=256m\
-XX:SurvivorRatio=12\
-XX:MaxTenuringThreshold=0\
-XX:+UseConcMarkSweepGC\
-XX:+CMSIncrementalMode\
-XX:+CMSIncrementalPacing\
-XX:+CMSClassUnloadingEnabled\
-XX:+CMSPermGenSweepingEnabled\
-XX:+DisableExplicitGC\
-XX:+UseParNewGC\
-XX:+UseTLAB\
-Djava.awt.headless=true\
-javaagent:$NR_JAR\
-Dnewrelic. environment=production"