ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Prouvost <>
Subject Getting environment variable on Linux or Windows ?
Date Wed, 07 Mar 2001 15:09:38 GMT


I'm trying to get the 'HOME' environment variable with ant, using linux
and windows.

In fact, I should directly get the user.home value which is defined by
the jvm. Unfortunately, on Windows environment, its value is
c:\Documents And Settings.... and it's not possible to change it easily.

So I would like to get a defined environment variable named 'HOME',
defined in windows user environment.

How to use the property task with environment attribute ??

<property name='HOME' environment="Linux" value="Linux.HOME"/>    ???
Does not work.

I put the 'Linux' value for environment like the os value defined for
exec task. Is it right ?
It seems strange, (windows os value is Windows 2000).

Or should it be :   <property name='HOME' environment="${}"
value="${}.HOME"/>   ??

Where are defined the different 'os' and 'environment' attribute values


  Olivier Prouvost     Anyware Technologies
  Tel : 05 61 00 52 90 Fax : 05 61 00 51 46
  Web :

View raw message