<tfoot id='3iE42'></tfoot>
  • <small id='3iE42'></small><noframes id='3iE42'>

  • <legend id='3iE42'><style id='3iE42'><dir id='3iE42'><q id='3iE42'></q></dir></style></legend>

      <i id='3iE42'><tr id='3iE42'><dt id='3iE42'><q id='3iE42'><span id='3iE42'><b id='3iE42'><form id='3iE42'><ins id='3iE42'></ins><ul id='3iE42'></ul><sub id='3iE42'></sub></form><legend id='3iE42'></legend><bdo id='3iE42'><pre id='3iE42'><center id='3iE42'></center></pre></bdo></b><th id='3iE42'></th></span></q></dt></tr></i><div id='3iE42'><tfoot id='3iE42'></tfoot><dl id='3iE42'><fieldset id='3iE42'></fieldset></dl></div>
        <bdo id='3iE42'></bdo><ul id='3iE42'></ul>

      1. CATALINA_OPTS 与 JAVA_OPTS - 有什么区别?

        时间:2023-08-23
        <tfoot id='TUXsP'></tfoot>

            <tbody id='TUXsP'></tbody>

            • <i id='TUXsP'><tr id='TUXsP'><dt id='TUXsP'><q id='TUXsP'><span id='TUXsP'><b id='TUXsP'><form id='TUXsP'><ins id='TUXsP'></ins><ul id='TUXsP'></ul><sub id='TUXsP'></sub></form><legend id='TUXsP'></legend><bdo id='TUXsP'><pre id='TUXsP'><center id='TUXsP'></center></pre></bdo></b><th id='TUXsP'></th></span></q></dt></tr></i><div id='TUXsP'><tfoot id='TUXsP'></tfoot><dl id='TUXsP'><fieldset id='TUXsP'></fieldset></dl></div>

              1. <small id='TUXsP'></small><noframes id='TUXsP'>

                <legend id='TUXsP'><style id='TUXsP'><dir id='TUXsP'><q id='TUXsP'></q></dir></style></legend>
                  <bdo id='TUXsP'></bdo><ul id='TUXsP'></ul>

                  本文介绍了CATALINA_OPTS 与 JAVA_OPTS - 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我试图找出 Apache Tomcat 变量之间的区别 - CATALINA_OPTS 和 JAVA_OPTSStackOverflow">SO 惊讶地发现这里还没有发布任何问题/答案.所以我想在发现差异后在这里分享它(有答案).检查下面的答案/差异.

                  I was trying to find out the difference between Apache Tomcat variables - CATALINA_OPTS and JAVA_OPTS in SO and surprised to see that there is no question/answer posted here yet. So I thought of sharing it here (with answer) after finding out the difference. Check the answer/difference below.

                  注意:在发布本文时,我们在 CentOS5 64 位架构上运行 Apache Tomcat v6.0.10 和 JDK 6u32.

                  NOTE: At the time of this posting, we're running Apache Tomcat v6.0.10 with JDK 6u32 on CentOS5 64-bit arch.

                  推荐答案

                  有两个环境变量 - CATALINA_OPTSJAVA_OPTS - 在 catalina.sh Tomcat 的启动和关闭脚本.它们在该文件的注释中被描述为:

                  There are two environment variables - CATALINA_OPTS and JAVA_OPTS - which are both used in the catalina.sh startup and shutdown script for Tomcat. They are described in comments within that file as:

                  [JAVA_OPTS]:(可选)开始"、停止"或运行"时使用的 Java 运行时选项命令被执行

                  [JAVA_OPTS]: (optional) Java runtime options used when the "start", "stop" or "run" command is executed

                  [CATALINA_OPTS]:(可选)Java 运行时选项执行start"或run"命令时使用

                  [CATALINA_OPTS]: (optional) Java runtime options used when the "start" or "run" command is executed

                  那么为什么会有两个不同的变量呢?又有什么区别?

                  首先,在 EITHER 变量中指定的任何内容都被传递给启动 Tomcat 的命令——start"或run"命令——但只有 JAVA_OPTS 中设置的值被传递给stop"命令.这可能对 Tomcat 在实践中的运行方式没有任何影响,因为它只影响运行的结束,而不是开始.

                  Firstly, anything specified in EITHER variable is passed, identically, to the command that starts up Tomcat - the "start" or "run" command - but only values set in JAVA_OPTS are passed to the "stop" command. That probably doesn't make any difference to how Tomcat runs in practise as it only effects the end of a run, not the start.

                  第二个区别更微妙.其他应用程序也可能使用 JAVA_OPTS,但只有 Tomcat 会使用 CATALINA_OPTS.因此,如果您设置的环境变量仅供 Tomcat 使用,则最好使用 CATALINA_OPTS,而如果您设置的环境变量也可供其他 java 应用程序使用,例如 JBoss,您应该将您在 JAVA_OPTS 中的设置.

                  The second difference is more subtle. Other applications may also use JAVA_OPTS, but only Tomcat will use CATALINA_OPTS. So if you're setting environment variables for use only by Tomcat, you'll be best advised to use CATALINA_OPTS, whereas if you're setting environment variables to be used by other java applications as well, such as by JBoss, you should put your settings in JAVA_OPTS.

                  来源: CATALINA_OPTS v JAVA_OPTS - 有什么区别?

                  这篇关于CATALINA_OPTS 与 JAVA_OPTS - 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:JVM 是编译器还是解释器? 下一篇:在 Dalvik VM(Android 的 VM)上,您不能在 Sun VM 中做什么?

                  相关文章

                  <tfoot id='Z7hQp'></tfoot>

                  <small id='Z7hQp'></small><noframes id='Z7hQp'>

                        <bdo id='Z7hQp'></bdo><ul id='Z7hQp'></ul>
                    1. <legend id='Z7hQp'><style id='Z7hQp'><dir id='Z7hQp'><q id='Z7hQp'></q></dir></style></legend>
                      <i id='Z7hQp'><tr id='Z7hQp'><dt id='Z7hQp'><q id='Z7hQp'><span id='Z7hQp'><b id='Z7hQp'><form id='Z7hQp'><ins id='Z7hQp'></ins><ul id='Z7hQp'></ul><sub id='Z7hQp'></sub></form><legend id='Z7hQp'></legend><bdo id='Z7hQp'><pre id='Z7hQp'><center id='Z7hQp'></center></pre></bdo></b><th id='Z7hQp'></th></span></q></dt></tr></i><div id='Z7hQp'><tfoot id='Z7hQp'></tfoot><dl id='Z7hQp'><fieldset id='Z7hQp'></fieldset></dl></div>