JDK-4532628 : java.util.prefs system prefs directory setup should be added to install script
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2001-11-29
  • Updated: 2013-06-04
  • Resolved: 2002-04-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
1.4.0_02 02Fixed 1.4.1Fixed
Related Reports
Relates :  
Description
Here is a suggested prefs install script which should be  included into the install script. Please feel free to modify /improve it.

This script creates java.util.prefs system root directory and necessary
files - lock file and mod file.

echo "Is Java going to be used from a network mounted drive? [yes or no]"
read answer
if [ "$answer" = "yes" ]
then 
    PREFS_LOCATION=$JAVA_HOME  
else
    PREFS_LOCATION=/etc/.java
fi
echo $PREFS_LOCATION
if [ ! -d $PREFS_LOCATION ] 
then 
    mkdir -m 755 $PREFS_LOCATION
fi
if [ ! -d $PREFS_LOCATION/.systemPrefs ]
then
    mkdir -m 755 $PREFS_LOCATION/.systemPrefs
fi
touch $PREFS_LOCATION/.systemPrefs/.system.lock
touch $PREFS_LOCATION/.systemPrefs/.systemRootModFile
chmod 666 $PREFS_LOCATION/.systemPrefs/.systemRootModFile
chmod 666 $PREFS_LOCATION/.systemPrefs/.system.lock 


The fix is to create the above mentioned files in /etc/.java with 
1. pkgadd 
2. if it's a root user installing with *.sh bundle with -localinstall option.

Otherwise they are always created in $JAVA_HOME, the directory where
JRE/JDK is extracted.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.0_02 hopper FIXED IN: 1.4.0_02 hopper INTEGRATED IN: 1.4.0_02 hopper
14-06-2004

PUBLIC COMMENTS fixed it for all unix platforms to create system prefs directories.
10-06-2004

EVALUATION This bug was filed too late for Merlin. It may be fixed in a later release. ###@###.### 2001-12-10
10-12-2001