<legend id='wCVEs'><style id='wCVEs'><dir id='wCVEs'><q id='wCVEs'></q></dir></style></legend>

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

    1. <tfoot id='wCVEs'></tfoot>
    2. Tomcat:如何在 Netbeans 中设置 Java 系统属性?

      Tomcat: How do I set up a Java system property in Netbeans?(Tomcat:如何在 Netbeans 中设置 Java 系统属性?)

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

                <tfoot id='4V1LU'></tfoot>

              1. <small id='4V1LU'></small><noframes id='4V1LU'>

                  <tbody id='4V1LU'></tbody>
                本文介绍了Tomcat:如何在 Netbeans 中设置 Java 系统属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我如何从 Netbeans 中为 Tomcat 设置一个我可以使用 System.getProperty(...);

                How do I, from Netbeans, for use with Tomcat, set up an environment variable that I can read using System.getProperty(...);

                我们有一个源代码控制项目 - 我们不断对我们愿意"分享的确认进行更改(不想使用 svn:ignore).我们正在尝试设置一个简单的参数,即应用程序配置属性的环境变量.例如:mark.properties 或 john.properties.如果系统找不到环境变量,则默认为 server.properties(用于实时系统).

                We have a source controlled project - and we're constantly making changes to confirurations that we "would" like to share (don't want to use svn:ignore). We're trying to set up one simple parameter, an environment variable to the config properties of our application. For example: mark.properties or john.properties. If the system can't find the environment variable, then it defaults to server.properties (for the live system).

                推荐答案

                1.转到 Tomcat 属性平台设置

                在 Netbeans 中,单击服务"标签.在服务器"下,您将看到Tomcat 7.0".右键单击Tomcat 7.0"并选择属性".然后选择平台"选项卡.

                In Netbeans, click the "Services" tag. Under "Servers", you'll see "Tomcat 7.0". Right click "Tomcat 7.0" and select "Properties". Then select the "Platform" tab.

                <强>2.在 VM 选项下,添加 -Dvariable=value

                将 D 保留在原位,并用您想要设置的任何变量名称替换该变量,并为您想要设置该变量的任何值赋值.

                Leave the D in place, and replace the variable with whatever variable name you'd like to set and value whatever value you'd like to set the variable to.

                3.从您的代码中读出属性.

                System.out.println("The value is " + System.getProperty("variable"));
                

                这篇关于Tomcat:如何在 Netbeans 中设置 Java 系统属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                  <bdo id='W76Cz'></bdo><ul id='W76Cz'></ul>

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

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