Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
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) ======================================================================
|