ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Issam Aib" <i...@bbcr.uwaterloo.ca>
Subject RE: How to get the value of a system's environment variable
Date Sun, 12 Feb 2006 21:57:38 GMT
Well,

I found the answer on the web:

You can access environment variables within Ant using:

<property environment="env"/>

This provides all environment variables as Ant properties prefixed by "env.". For example,
CLASSPATH would be accessible in Ant as ${env.CLASSPATH}.
Help Source: http://www.java-tips.org/content/view/740/29/


Thanks anyway,

Issam Aib

> -----Original Message-----
> From: Issam Aib [mailto:iaib@bbcr.uwaterloo.ca]
> Sent: February 12, 2006 4:43 PM
> To: 'Ant Users List'
> Subject: How to get the value of a system's environment variable
> 
> Hi folks,
> 
> 
> 
> I would like to get the value of some system environment variables, such
> as TOMCAT_HOME, PATH, CVSROOT, etc, as a property inside my ant script.
> 
> 
> 
> Can anyone help?
> 
> 
> 
> Thanks,
> 
> Issam Aib



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


Mime
View raw message