ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Leo <m...@cariboulake.com>
Subject Re: What properties are available
Date Thu, 09 Aug 2001 14:20:17 GMT

Actually, they are available within ANT, at least on Solaris:

   <property environment = "mysys"/>

will give you access to all the operating systems environment
variables (if your OS has them ;-) via

    ${mysys.PATH}

or whatever.

Hope this helps,

Cheers,

Mike Leo

At 10:21 AM 8/9/2001 -0400, Matthew Inger wrote:
>Environment variables are a non standard way of doing things
>with java.  The reason they are not readily available is that they
>do not exist on all platforms (here is where I cough, and point
>fingers at MacOs before version X).
>
>Therefore, they're not available.  the way  you have to make them
>available is by passing them on the command line as System properties:
>
>java -Dmy.var=${MY_VAR} test.class
>
>
>
>Stefan Bodewig wrote:
>
>>On Thu, 9 Aug 2001, Patrick O'Hara <patrick.ohara@workscape.com>
>>wrote:
>>
>>>I have found that the environment is not available on Win2K.
>>
>>Java (>= JDK 1.1) doesn't have access to environment variables on any
>>platform I was aware of.
>>
>>>I am wondering if these values are available as properties within
>>>Ant.
>>
>>ANT_HOME will be the property ant.home, if and only if you invoke Ant
>>with the wrapper script that ships with it - JAVA_HOME is vaguely the
>>same as java.home, they are identical for JDK 1.1, but JDK 1.2+ make
>>java.home point to JAVA_HOME/jre.
>>
>>More generally, to access environment variables, take a look at
>><property>'s environment attribute.
>>
>>>The more general question is how can I get a list of the properties
>>>that are available?
>>
>>ant -debug
>>(make sure you capture the stuff somewhere as the output may be
>>overwhelming 8-).
>>
>>Stefan
>
>
>--
>Matt Inger (matt.inger@sedonacorp.com)
>Sedona Corporation
>455 S. Gulph Road, Suite 300
>King of Prussia, PA 19406
>(484) 679-2213
>"Self-respect - the secure feeling that no one,
>as yet, is suspicious." -H.L. Mencken
>
>
>
>_____________________________________________________________________
>This message has been checked for all known viruses by the MessageLabs 
>Virus Scanning Service. For further information visit
>http://www.messagelabs.com/stats.asp


Mime
View raw message