-
Bug
-
Resolution: Won't Fix
-
P5
-
None
-
1.1.5, 1.2.0, 1.2.2, 1.3.0, 1.4.0, 1.4.1, 5.0, 6u10
-
generic, x86
-
generic, linux, windows_nt, windows_2000, windows_xp
While the user set uer.dir in command line, then the File initialed with an relatively directory will occur a problem:
That is, If you get it's AbsolutePath, it relate on the dirctory which user defined. but when you test if this file exist, the related directory is still where the javaVM been setup.
Name: skT88420 Date: 12/07/99
C:\gcs\serverconnect\src\org\objectweb\jonas\tools>java -version
java version "1.2"
Classic VM (build JDK-1.2-V, native threads)
Hi;
We need to set the default directory for some java tools we call (that are not
our code). We have found the following:
1) user.dir returns the default directory.
2) If you set user.dir in a program - it has no effect.
3) If you set it on the command line, it only half works.
3a) This call gives you the directory you set: new File ( fileName).getAbsoluteFile ( )
3b) This call uses the original default directory - not user.dir: newFileInputStream ( fileName )
I think this is a bug - ???
- dave
(Review ID: 98747)
======================================================================
That is, If you get it's AbsolutePath, it relate on the dirctory which user defined. but when you test if this file exist, the related directory is still where the javaVM been setup.
Name: skT88420 Date: 12/07/99
C:\gcs\serverconnect\src\org\objectweb\jonas\tools>java -version
java version "1.2"
Classic VM (build JDK-1.2-V, native threads)
Hi;
We need to set the default directory for some java tools we call (that are not
our code). We have found the following:
1) user.dir returns the default directory.
2) If you set user.dir in a program - it has no effect.
3) If you set it on the command line, it only half works.
3a) This call gives you the directory you set: new File ( fileName).getAbsoluteFile ( )
3b) This call uses the original default directory - not user.dir: newFileInputStream ( fileName )
I think this is a bug - ???
- dave
(Review ID: 98747)
======================================================================
- duplicates
-
JDK-4740945 File's methods give inconsistent results if "user.dir" changed
- Closed
-
JDK-4722567 File and File{In,Out}putStream path directories inconsistent if user.dir is set on cmd line
- Closed
-
JDK-4807099 File.exists() fails with relative paths after user.dir is modified
- Closed
-
JDK-5082706 File constructor and methods don't consistently resolve relative paths against user.dir
- Closed