ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: How can I access the environtment variable JAVA_HOME?
Date Wed, 01 Mar 2006 13:10:27 GMT
>Also all of the  java system properties(the one you can get with
>System.getProperties) are available in Ant:
>
>"file.separator" - File separator (for example, "/") 
>"java.class.path" - Java classpath "java.class.version" - Java 
>class version number "java.home" - Java installation directory 
>"java.vendor" - Java vendor-specific string "java.vendor.url" 
>- Java vendor URL "java.version" - Java version number  
>"line.separator" - Line separator  "os.arch" - Operating 
>system architecture "os.name" - Operating system name 
>"os.version" - Operating system version  "path.separator" - 
>Path separator (for example, ":")  "user.dir" - User's current 
>working directory "user.home" - User home directory 
>"user.name" - User account name
>
>You can use them in your build script as any other property.


They are listed in 
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getPropert
ies()

and directly accesible in Ant - without the need to <property> them or
having a
special prefix. Just use ${line.separator} ...

See also the manual 
http://ant.apache.org/manual/using.html#properties


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message