JDK-6760147 : java programs are not usable when current directory is unknown
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: solaris
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2008-10-16
  • Updated: 2010-09-29
  • Resolved: 2008-10-16
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
In SST we hit the following java usability problem (present in both s10 and nevada):

CR 4698332 (closed as not a defect) describes the following java problem when current 
dirrectory can't be retrieved, for java itself it might not be a defect but it affects all programs build on java.

Example of directories when this occurs:
- on nfs mounts as different user
- /home might not be readable to avoid listings, but you have full access to /home/yourself 

See an example:
$ mkdir -p a/b
$ chmod 300 a
$ cd a/b
$ pntadm
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
$ dhtadm
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
$ dhcpconfig 
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
...

None of the java programs will work in the directory above although you have full access to files.

Another situation:
cat file1 | some_java_program > file2
may not work depending on your current directory.

I see this as a usability problem. The programs generally shouldn't stop for reasons which are not in any sense connected to their functionality.