United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4532628 : java.util.prefs system prefs directory setup should be added to install script

Details
Type:
Bug
Submit Date:
2001-11-29
Status:
Closed
Updated Date:
2013-06-04
Project Name:
JDK
Resolved Date:
2002-04-29
Component:
install
OS:
solaris_8
Sub-Component:
install
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.0_02 (02)

Related Reports
Backport:
Relates:

Sub Tasks

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
EVALUATION

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

fixed it for all unix platforms to  create system prefs directories.

                                     
2004-06-10
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


                                     
2004-06-14



Hardware and Software, Engineered to Work Together