How to access all Java system properties directly?

java-system-properties

java-system-properties

You could access all Java system properties directly via ${name}, e.g.

${user.name}, ${user.dir}, ${user.home}, …

You could read environment properties and use them

  <properties environment=”env”/>

  ${env.ENVIRONMENT_VARIABLE}

e.g.

  ${env.USERPROFILE}, ${env.USERNAME}, ${env.PATH}

You could pass properties during Ants start

  ant -Dname=value -Danothername=anothervalue

Also you Ant could ask for input

  <input addproperty=”foo”/>

  ${foo}

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x