In java -D what does the D stand for?

前端 未结 4 1611
陌清茗
陌清茗 2021-01-31 14:59

What does the D in

-Dproperty=value

Set a system property value.

of the java application launcher stand for? For some reason it\'s been

4条回答
  •  广开言路
    2021-01-31 15:53

    I've always assumed it was to define the value of a property... possibly a legacy from C compilers, which often use -D as similar to #define in code.

    EDIT: The closest I have to a source for this at the moment is some JDK 1.1 documentation which specifies the flag as:

    Redefines a property value. propertyName is the name of the property whose value you want to change and newValue is the value to change it to. [...]

    That at least contains the word "redefine" which is close to "define" :)

提交回复
热议问题