JDK-4710138 : directory and file are not created to NFS mounted directory with TurboLinux7
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2002-07-01
  • Updated: 2002-07-30
  • Resolved: 2002-07-19
Related Reports
Duplicate :  
Description
A program HotKeyWrite.java (it pasted below) which uses java.util.prefs.Preferences and it creates directories and files under $HOME/.java/.userPrefs

In case $HOME directory set on local file system, attached program creates
directories and files properly.
But that directories and files are not created under $HOME/.java/.userPrefs
that NFS mounted directory with TurboLinux7 work station that kernel 2.4.5, glibc 2.2.3, gcc 2.95.3, nfs-utils-0.3.1-2.
This test is done with hopper-b15 and b16. 

This program works fine with RedhatLinux7.1, 7.2 and TurboLinux8 though,
it creates directories and files under $HOME/.java/.userPrefs
that mounted on NFS.  

Directory and file under $HOME/.java/.userPrefs should be created with
this program as follows.

$HOME/.java/.userPrefs/java
                          |-- awt
                          |   |-- im
                          |   |-- prefs.xml
                          |   |   `-- selectionKey
                          |   |       `-- prefs.xml
                          |   `-- prefs.xml
                          `-- prefs.xml




HotKeyWrite.java start -------------------

import java.awt.event.*;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.prefs.Preferences;

public class HotKeyWrite {
    
    /* Key names for java.util.prefs */
    static final String nodePath = "/java/awt/im/selectionKey";
    static final String keyCodeName = "keyCode";
    static final String modifiersName = "modifiers";

    /**
     * Writes the selection key settings to the persistant storage
     */
    static void writeSelectionKey() {
        AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
                Preferences root = Preferences.userRoot();
                Preferences node = root.node(nodePath);
                node.putInt(keyCodeName, KeyEvent.VK_F4);
                node.putInt(modifiersName, 0);
                return null;
            }
        });
    }

    /**
     * The main
     */
    public static void main(String[] args) {
        writeSelectionKey();
    }
}

End -----------------------------




Comments
EVALUATION File locking fails over NFS on this version of Linux
11-06-2004