This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: java.io.File and properties


"Ranjit Mathew" <rmathew4lists@hotmail.com> writes:

> > The above from Sun looks stupid.  At what point is it useful to allow
> > programmer's to modify tmpdir at runtime but not let that change the
> > way createTempFile works?  I guess we can be bug compatible here, but
> > we may need a gnu.java.io.File.getTempDir() that works better.
> 
> BTW, I should note that the output is unchanged if I use
> System.setProperty( ) instead of put( ).
> 
> Similarly, 'new File( ".").listFiles( )' is unaffected by
> any value I set for "user.dir".

Yes, you have to use JNI to actually modify the CWD under Java.  I
think because some system some where that has a file system doesn't
necessarily have a CWD concept.  Annoys you when you really would like
to do this.

Brian
-- 
Brian Jones <cbj@gnu.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]