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:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to