Richard Campbell writes:
 > Setting user.dir will do nothing, unless every call you 
 > make to open a file prepends "System.getProperty(user.dir)".
 > 

The problem is that I want to avoid passing the full path of
the source file to the compiler because this results in the
compiler storing the full path as part of the debug info
in the resulting class file, which then causes JPDA to have
a problem with setting breakpoints in the class. You see,
JDEbug uses a form of the JDPA "set breakpoint" method where
you specify the line number relative to the source file rather
than to the class file. This simplifies setting breakpoints
in inner classes but has the apparent drawback that JPDA (and
hence JDEbug) misses breakpoints in files compiled with 
full pathnames of source files.

- Paul

 > 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
 > 

Reply via email to