Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 12921 invoked from network); 5 Jul 2000 10:34:18 -0000 Received: from smtp01ffm.de.uu.net (192.76.144.150) by locus.apache.org with SMTP; 5 Jul 2000 10:34:18 -0000 Received: from sbodewig.bost.de ([195.127.75.69]) by smtp01ffm.de.uu.net (5.5.5/5.5.5) with ESMTP id MAA26371 for ; Wed, 5 Jul 2000 12:34:08 +0200 (MET DST) Received: (from bodewig@localhost) by sbodewig.bost.de (8.9.3/8.9.3) id MAA07235; Wed, 5 Jul 2000 12:34:07 +0200 X-Authentication-Warning: sbodewig.bost.de: bodewig set sender to bodewig@bost.de using -f To: ant-dev@jakarta.apache.org Subject: Re: Working Directory Woes ... or Not ? From: Stefan Bodewig Date: 05 Jul 2000 12:34:06 +0200 Message-ID: Lines: 18 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Canyonlands) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N --=-=-= Hi Peter, maybe I didn't understand what you've tried. The appended little program sets user.dir to whatever you provide on the command line, and invokes pwd after that. The result on my linux box with Blackdown's JDK 1.2.2RC4: bodewig@sbodewig ~ >pwd /home/bodewig bodewig@sbodewig ~ >java Cd /tmp /home/bodewig so it doesn't work at my place, sorry. Stefan --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=Cd.java import java.io.*; public class Cd { public static void main(String[] args) throws Exception { System.setProperty("user.dir", args[0]); Process p = Runtime.getRuntime().exec("pwd"); BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream())); String s = r.readLine(); while (s != null) { System.err.println(s); s = r.readLine(); } p.waitFor(); } } --=-=-=--