java.io.File and properties

Tom Tromey tromey@redhat.com
Fri May 9 04:21:00 GMT 2003


>>>>> "Michael" == Michael Koch <konqueror@gmx.de> writes:

Michael> I have question: java.io.File initializes a static variable called 
Michael> tmpdir at class initialization with the value of the property 
Michael> "java.io.tmpdir". If an app changes the value of this property after 
Michael> java.io.File.tmpdir has been initialized java.io.File will use the 
Michael> old value.

What does the JDK do?

In many cases the JDK doesn't track changes to system properties.  If
it doesn't, there's no a priori reason for us to (it may still be
useful, but it would have to be argued on different merits).  If the
JDK does, then it is a compatibility point and should be done.

Tom



More information about the Java mailing list