Setting user.dir will do nothing, unless every call you make to open a file prepends "System.getProperty(user.dir)".
There is no way to change the working directory globally in java, although you can exec programs from a specified directory in 1.3 or later. -Richard Campbell. -----Original Message----- From: Javier S. L�pez [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 8:32 AM To: 'Paul Kinnucan'; [EMAIL PROTECTED] Subject: RE: How to set current working directory? I believe setting the system property user.dir will get the trick done. Javier > -----Original Message----- > From: Paul Kinnucan [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 05, 2001 7:38 AM > To: [EMAIL PROTECTED] > Subject: How to set current working directory? > > Hi all, > > Is there any way to set the current working directory in Java. I want to > be able to change the beanshell's current directory to the directory of > the current source buffer so I don't need to specify the full path of the > source file to be compiled. The beanshell has a cd command but it does not > appear to work. > > - Paul
