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 70353 invoked from network); 5 Jul 2000 05:57:26 -0000 Received: from me-sv-02.free.net.au (202.147.17.2) by locus.apache.org with SMTP; 5 Jul 2000 05:57:26 -0000 Received: (qmail 19797 invoked from network); 5 Jul 2000 02:36:52 -0000 Received: from me-as-01-201.free.net.au (HELO donalgar) (202.147.18.201) by me-sv-02.free.net.au with SMTP; 5 Jul 2000 02:36:52 -0000 Message-Id: <3.0.5.32.20000705123338.0087f180@latcs4.cs.latrobe.edu.au> X-Sender: pjdonald@latcs4.cs.latrobe.edu.au X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) Date: Wed, 05 Jul 2000 12:33:38 +1000 To: ant-dev@jakarta.apache.org From: Peter Donald Subject: Working Directory Woes ... or Not ? In-Reply-To: <85256913.000D9292.00@d54mta04.raleigh.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hi, Can someone point out where my stupidity lies here :P. I was under the impression that working directory was impossible to set in java. However recently I have been playing with System.setProperty("user.dir","someotherdirectory") and everything seems to work !!! hmmm The only problems occured when I used relative paths. So what I did at the begining of my program was resolve any relative paths to absolute paths. This means you have to resolve some system properties (ie "java.class.path") and also some internal paths inside the program. So all my tests seem to work but I have always been under impression this is impossible and have had several knowledgable people preach at me that it was impossible. So have I missed something ???? If I haven't missed anything this could be implemented in ant no ? Then we would no longer have to set ant home because everything could be done via class-loaders and this no ? (Except for rare occasions when need to change security manager, connection factory or whatever multiple times for different tasks). Cheers, Pete *------------------------------------------------------* | "Nearly all men can stand adversity, but if you want | | to test a man's character, give him power." | | -Abraham Lincoln | *------------------------------------------------------*