ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petar Tahchiev" <paranoia...@gmail.com>
Subject Re: How can I access the environtment variable JAVA_HOME?
Date Wed, 01 Mar 2006 13:00:01 GMT
On 01/03/06, Jan.Materne@rzf.fin-nrw.de <Jan.Materne@rzf.fin-nrw.de> wrote:
> >Betreff: How can I access the environtment variable JAVA_HOME?
>
> <property environment="env"/>    <!-- access to all env variables by
> prefix
> <echo> ${env.JAVA_HOME} </echo>
>
>
>
> >(if there is another way of using the C compiler i'll
> >be gratefull if any of you could tell me)
>
> ant-contrib has some c-related tasks. Dont know if they fit here ....
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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.

--
Regards, Petar!

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


Mime
View raw message