ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Alth" <OA...@de.ibm.com>
Subject Reading OS-Specific Environment Variables
Date Mon, 26 May 2003 13:10:04 GMT

Hello,

I would like to read OS-Specific environment variables using the Ant API.
In the JAVADOC, I found this one:

public void setEnvironment(java.lang.String env)
      the prefix to use when retrieving environment variables. Thus if you
      specify environment="myenv" you will be able to access OS-specific
      environment variables via property names "myenv.PATH" or
      "myenv.TERM".


      Note that if you supply a property name with a final "." it will not
      be doubled. ie environment="myenv." will still allow access of
      environment variables through "myenv.PATH" and "myenv.TERM". This
      functionality is currently only implemented on select platforms. Feel
      free to send patches to increase the number of platforms this
      functionality is supported on ;).
      Note also that properties are case sensitive, even if the environment
      variables on your operating system are not, e.g. it will be
      ${env.Path} not ${env.PATH} on Windows 2000.


Parameters:
      env - prefix

But How can I read out those variables?

Thanks,

Oliver


__________________________________________________________________
IBM Deutschland Entwicklung GmbH, Schönaicher Str. 220, D-71032 Böblingen
eServer Software Management, D4357, Intern: 7103-06, Tel. 902-2790,
Tel.: ++49-(0)7031-16-4280, Fax.: 07031-16-2790
Internet: OALTH@DE.IBM.COM


Mime
View raw message