JDK-4729636 : util.prefs output to console
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 1.4.0,1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris,solaris_2.5,solaris_7
  • CPU: sparc
  • Submitted: 2002-08-09
  • Updated: 2002-11-15
  • Resolved: 2002-11-15
Related Reports
Duplicate :  
Relates :  
Description
Running the JavaHelp viewer using "1.4.1-rc-b19", I'm seeing the following
output:

java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs.Unix error code 0.
Aug 9, 2002 4:05:26 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
Aug 9, 2002 4:05:56 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs.Unix error code 0.
Aug 9, 2002 4:05:56 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

Comments
WORK AROUND For the record, these directories need to exist with permissions 755: /etc/.java/ /etc/.java/.systemPrefs/ These files should be created with permissions 644: /etc/.java/.systemPrefs/.system.lock /etc/.java/.systemPrefs/.systemRootModFile Also, if seems that you need to restart any running VMs to have the changes take effect; the libraries seem to poll at the location of the JDK rather than /etc/ if the /etc/ files were not found at startup. The install script for JDK 1.4.1 does the following (for Solaris): if [ ! -d $PREFS_LOCATION ] ; then mkdir -m 755 $PREFS_LOCATION fi if [ ! -d $PREFS_LOCATION/.systemPrefs ] ; then mkdir -m 755 $PREFS_LOCATION/.systemPrefs fi if [ ! -f $PREFS_LOCATION/.systemPrefs/.system.lock ] ; then touch $PREFS_LOCATION/.systemPrefs/.system.lock chmod 644 $PREFS_LOCATION/.systemPrefs/.system.lock fi if [ ! -f $PREFS_LOCATION/.systemPrefs/.systemRootModFile ] ; then touch $PREFS_LOCATION/.systemPrefs/.systemRootModFile chmod 644 $PREFS_LOCATION/.systemPrefs/.systemRootModFile fi fi ###@###.### 2002-08-27
27-08-2002

EVALUATION Additional logging was added in 1.4.1, alerting the user to the fact that System preferences are not usable if a system preferences directory was not created at install time. If you do not need system preferences (most apps don't) it's safe to ignore these warnings. Alternatively, you can create a system prefs directory (typically /etc/.java/.systemPrefs). This is normally done by the install script. In the absence of a system prefs directory, messages would be eliminated if prefs were synced more lazily, ignoring system prefs entirely until they were used. This was done for Mantis (1.4.2). In the meantime, the warnings may be safely ignored unless you need access to system prefs. ###@###.### 2002-08-12
12-08-2002