tomcat里CATALINA_OPTS和JAVA_OPTS

通常在tomcat里配置JVM参数时,通常使用这两个参数,

tomcat版本8.0.4;

#   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
#                   "run" or "debug" command is executed.
#                   Include here and not in JAVA_OPTS all options, that should
#                   only be used by Tomcat itself, not by the stop process,
#                   the version command etc.
#                   Examples are heap size, GC logging, JMX ports etc.


#   JAVA_OPTS       (Optional) Java runtime options used when any command
#                   is executed.
#                   Include here and not in CATALINA_OPTS all options, that
#                   should be used by Tomcat and also by the stop process,
#                   the version command etc.
#                   Most options should go into CATALINA_OPTS.

大致一样,CATALINA_OPTS里参数只能tomcat本身用,不会被stop、version命令使用。

大多数情况使用CATALINA_OPTS

posted @ 2022-03-09 11:39  wujingqi  阅读(1452)  评论(0编辑  收藏  举报