windows下jetty配置jvm启动参数

命令行到jetty安装目录执行以下指令:

D:\work\jetty>java -jar start.jar --add-to-start=jvm
INFO: jvm             initialised in ${jetty.base}\start.ini (appended)
D:\work\jetty>

--add-to-start表示启用一个模块,包括http,webapp,deploy等等,语法为:

 --add-to-start=,,...etc.

启用jvm模块,会在start.ini文件中初始化jvm启动参数相关配置,打开start.ini文件可以看到文件末尾追加了以下内容:

# --------------------------------------- 
# Module: jvm
--module=jvm
## JVM Configuration
## If JVM args are include in an ini file then --exec is needed
## to start a new JVM from start.jar with the extra args.
##
## If you wish to avoid an extra JVM running, place JVM args
## on the normal command line and do not use --exec
--exec
# -Xmx2000m
# -Xmn512m
# -XX:+UseConcMarkSweepGC
# -XX:ParallelCMSThreads=2
# -XX:+CMSClassUnloadingEnabled
# -XX:+UseCMSCompactAtFullCollection
# -XX:CMSInitiatingOccupancyFraction=80
# -verbose:gc
# -XX:+PrintGCDateStamps
# -XX:+PrintGCTimeStamps
# -XX:+PrintGCDetails
# -XX:+PrintTenuringDistribution
# -XX:+PrintCommandLineFlags
# -XX:+DisableExplicitGC
# -Dorg.apache.jasper.compiler.disablejsr199=true

其中,--exec需要手动删除注释,其它参数按需配置即可

你可能感兴趣的:(JVM,jetty,jetty,jvm启动参数)