本文介绍了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(...);


推荐答案

1。转到Tomcat属性平台设置

2。在VM选项下,添加-Dvariable = value

3。从您的代码中读出该属性。

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

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

05-27 00:56
查看更多