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 97715 invoked from network); 17 Oct 2000 13:42:10 -0000 Received: from unknown (HELO inferno.globalrecall.com) (62.189.46.253) by locus.apache.org with SMTP; 17 Oct 2000 13:42:10 -0000 Received: by INFERNO with Internet Mail Service (5.5.2650.21) id ; Tue, 17 Oct 2000 14:39:05 +0100 Message-ID: <4EF5B694DF1CD211B4B60060085595A4433663@INFERNO> From: Russell Freeman To: "'ant-user@jakarta.apache.org'" Subject: RE: Access environment variables Date: Tue, 17 Oct 2000 14:39:05 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Stefan, if Java cannot access the environment directly, would it not be possible to create a JNI interface that calls the underlying C call, e.g. getenv() ? (Sorry if this falls off topic) Russ -----Original Message----- From: Peter Breitling [mailto:breitlip@informatik.tu-muenchen.de] Sent: 17 October 2000 16:38 To: ant-user@jakarta.apache.org Subject: Re: Access environment variables Hum, i feared that. But then i need a wrapper script and this is not elegant. Is there a reason for this design? Stefan Bodewig wrote: > > >>>>> "PB" == Peter Breitling writes: > > PB> I want to access %J2EE_HOME% environment in a portable way. > > Unfortunately there is no portable way to access environment variables > in Java, sorry. You'll need to invoke Ant from a wrapper script with > something like > > ant -DJ2EE_HOME=%J2EE_HOME% > > or > > ant -DJ2EE_HOME=${J2EE_HOME} > > Stefan -- Peter Breitling _________________________________________________________________ http://www.in.tum.de/~breitlip