Idle Musings: Correct value of "user.dir"
Tom Tromey
tromey@redhat.com
Fri Feb 28 05:38:00 GMT 2003
>>>>> "Ranjit" == Ranjit Mathew <rmathew4lists@hotmail.com> writes:
Ranjit> Apparently it's the *former* - I wrote a simple test program in Java
Ranjit> with a JNI helper method to change the directory and tested it with
Ranjit> Sun's JDK 1.4.1 on Win2K.
Ranjit> Imagine the kludges needed in the code trying to implement this
Ranjit> if it were the *latter*!
In Java all the system properties seem to be set once, at startup, and
then never change. The user program can change them, but generally
this only affects code that looks things up in the future -- the
system classes appear to be free to cache the values when they are
initialized, and never bother doing a lookup again.
Tom
More information about the Java
mailing list