Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 91233 invoked from network); 15 Nov 2000 09:08:09 -0000 Received: from public.ndh.net (HELO public.ndh.com) (195.94.90.21) by locus.apache.org with SMTP; 15 Nov 2000 09:08:09 -0000 Received: from bodewig.bost.de ([195.227.98.11]) by public.ndh.com (8.9.3/8.8.0) with ESMTP id KAA22370 for ; Wed, 15 Nov 2000 10:08:03 +0100 (MET) Received: (from bodewig@localhost) by bodewig.bost.de (8.9.3/8.9.3) id KAA06409; Wed, 15 Nov 2000 10:07:57 +0100 X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@bost.de using -f To: ant-user@jakarta.apache.org Subject: Re: reading system variables? References: From: Stefan Bodewig Date: 15 Nov 2000 10:07:57 +0100 In-Reply-To: Hadi Abedi's message of "Tue, 14 Nov 2000 14:38:05 -0500" Message-ID: Lines: 38 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hadi Abedi wrote: > So Should I assume that any arbitrary system variables that I > define, like MYPATH, I must pass it in as arguments to Ant? Yes it is. Java doesn't provide access to environment variables, so you need to translate them into something Java knows, i.e. properties. > How about if I am running it on a UNIX platform, do I still use > -DOS? Cyril gave an example -Dos.path=$PATH that defined a property os.path, the general syntax is -DPROPERTYNAME=PROPERTYVALUE - on any Java platform. > Also, is there a list of predefined properties for Ant? The online version of the Ant manual has a section labeled "Built in Properties" short after . In addition to these there is ant.home which points to the directory where Ant has been installed if and only if you use the starter script named ant or ant.bat. Furthermore Ant gives you access to all System properties, please refer to the JDK API documentation on the System class to get a list of the predefined ones (usually there are more than the ones listed there). If you invoke ant -debug, you can see a bunch of lines reading something like Setting project property: java.vm.vendor -> IBM Corporation this will give you a list of everything that has been defined. Stefan