Jetty – How to Configure JAVA_OPTIONS in linux

Issue

I have jetty status like this

[email protected]:/opt/jetty/bin# ./jetty.sh status
Checking arguments to Jetty:
START_INI      =  /opt/jetty/start.ini
JETTY_HOME     =  /opt/jetty
JETTY_BASE     =  /opt/jetty
JETTY_CONF     =  /opt/jetty/etc/jetty.conf
JETTY_PID      =  /var/run/jetty.pid
JETTY_START    =  /opt/jetty/start.jar
JETTY_LOGS     =  /opt/jetty/logs
JETTY_STATE    =  /opt/jetty/jetty.state
CLASSPATH      =
JAVA           =  /usr/bin/java
JAVA_OPTIONS   =  -Xms4096m -Xmx4096m -server -XX:+CMSClassUnloadingEnabled -XX:PermSize=2048m -XX:MaxPermSize=2048m -Djetty.logs=/opt/jetty/logs -Djetty.home=/opt/jetty -Djetty.base=/opt/jetty -Djava.io.tmpdir=/tmp
JETTY_ARGS     =  jetty.state=/opt/jetty/jetty.state jetty-logging.xml jetty-started.xml
RUN_CMD        =  /usr/bin/java -Xms4096m -Xmx4096m -server -XX:+CMSClassUnloadingEnabled -XX:PermSize=2048m -XX:MaxPermSize=2048m -Djetty.logs=/opt/jetty/logs -Djetty.home=/opt/jetty -Djetty.base=/opt/jetty -Djava.io.tmpdir=/tmp -jar /opt/jetty/start.jar jetty.state=/opt/jetty/jetty.state jetty-logging.xml jetty-started.xml

I want to add in JAVA_OPTION -XX:-UseGCOverheadLimit

How to add it?

Solution

Edit the /etc/default/jetty file to specify the JAVA_OPTIONS you want to use.

Answered By – Joakim Erdfelt

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published