Develop22
Develop22

Reputation: 43

Difference between -D and -d environment variables in Java

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

Upvotes: 4

Views: 3901

Answers (1)

stacker
stacker

Reputation: 68972

java -help prints:

-D= set a system property

if invoked with -d it prints the error messages:

Unrecognized option: -d

another option starting with d:

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

Upvotes: 6

Related Questions