This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Idle Musings: Correct value of "user.dir"
- From: "Ranjit Mathew" <rmathew4lists at hotmail dot com>
- To: "GCJ" <java at gcc dot gnu dot org>
- Date: Wed, 26 Feb 2003 10:36:46 +0530
- Subject: Idle Musings: Correct value of "user.dir"
- Reply-to: "Ranjit Mathew" <rmathew at hotmail dot com>
Hi,
The "user.dir" system property is used to indicate "User's current
working directory" according to the Sun JDK 1.4.1 docs - however, is
it the working directory *at the time of process creation* or *at the
time of lookup*?
Apparently it's the *former* - I wrote a simple test program in Java
with a JNI helper method to change the directory and tested it with
Sun's JDK 1.4.1 on Win2K.
So it looks like we are safe here.
Imagine the kludges needed in the code trying to implement this
if it were the *latter*!
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/