Java中-D和-d环境变量的区别

时间:2021-05-14 23:10:25

I understood how environment variables works in Java, setting -DVariable and getting with System.getProperty("Variable"). But i've seen sometimes examples with "-d" variable using lowercase, and I wonder what's the difference between that? I found no answer googling.. Thanks in advance

我理解环境变量如何在Java中工作,设置-DVariable并使用System.getProperty(“Variable”)获取。但我有时会看到使用小写的“-d”变量的例子,我想知道它们之间的区别是什么?我发现没有回答谷歌搜索..提前谢谢

1 个解决方案

#1


5  

java -help prints:

java -help打印:

-D= set a system property

-D =设置系统属性

if invoked with -d it prints the error messages:

如果用-d调用它会输出错误消息:

Unrecognized option: -d

another option starting with d:

另一种选择以d开头:

-dsa | -disablesystemassertions disable system assertions (This cannot be used to set variables).

-dsa | -disablesystemassertions禁用系统断言(这不能用于设置变量)。

#1


5  

java -help prints:

java -help打印:

-D= set a system property

-D =设置系统属性

if invoked with -d it prints the error messages:

如果用-d调用它会输出错误消息:

Unrecognized option: -d

another option starting with d:

另一种选择以d开头:

-dsa | -disablesystemassertions disable system assertions (This cannot be used to set variables).

-dsa | -disablesystemassertions禁用系统断言(这不能用于设置变量)。