Passing java options to jetty.sh

16,868

On line 43 of jetty.sh you will see.

# JAVA_OPTIONS
#   Extra options to pass to the JVM

Just put this after it:

JAVA_OPTIONS="-Xms1024m -Xmx1024m -server -XX:+UseConcMarkSweepGC"
Share:
16,868
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin about 2 years

    Normally, I'll start jetty (version 8) using this:

     java -jar -Xms1024m -Xmx1024m -server -XX:+UseConcMarkSweepGC start.jar
    

    But now I'm using jetty.sh to run jetty on startup.
    Does anyone know how can I pass the above java options to jetty? Is it through the jetty.xml file? If so, what is the syntax?

  • Brad Ellis
    Brad Ellis almost 7 years
    Shouldn't you use {JAVA_OPTIONS="$JAVA_OPTIONS [options]"} Or does it not matter because they are options and don't overwrite exiting args?