Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4838770

(prefs) Requirement to install JVM as root not documented

    • sparc
    • solaris_8

      Name: rmT116609 Date: 03/27/2003


      A DESCRIPTION OF THE PROBLEM :
      Java 1.4 VM's require the ability to create files in /etc/.java/.systemPrefs for storing system preferences for the Preferences API. On most Unix systems, the /etc directory is writable only by root. If the installation of the JRE/JDK is performed by a non-root user, this directory is not created. Subsequently, the VM tries to create this directory when it discovers that it doesn't exist. Until the VM is executed by root, the directories will not be created (unless root creates them manually). Until the directories exist, several warning messages are produced (refer to any of the Bug reports referenced).
      The problem is that none of the installation instructions or readme's state that the JRE/JDK must be installed as root. In fact, the installation instructions for Solaris indicate that you may install the JDK as any non-root user. The instructions fail to point out that doing so may prevent some applications from executing properly.
        Bug 4694577 suggests lazy creation of these directories. That will not help solve the issue of the warning messages if the VM was not installed as root, and the directories were not created at install time.
        Bug 4729636 illustrates the script which creates the directories. Well, unless the script is being executed with root permission, none of the directories will be created. The Bug report goes on to state that the warnings can be ignored unless you need access to system preferences. But what if you do? You should be able to expect that your users have a valid JRE/JDK installation, and that you can count on such installations to be valid if the users have followed the instructions for installing the JRE/JDK.
        Bug 4635353 isn't particularly related, but contains much feedback from users about the problems of a VM not installed by root.

      The problem of requiring root priviledge to install a 1.4 or greater VM is of particular concern to application developers who distribute a 1.4 VM with their application. If such applications have to be installed as root in order to function correctly, the developers have to know!

      FULL OS VERSION :
      Applies to all OS'es that use java.util.prefs.FileSystemPreferences for storing system preferences

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      JRE/JDK not installed by root.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      None, other than documenting in the installation instructions for Unix platforms the requirement that the installer have write priviliedge to the /etc directory.
      (Review ID: 182770)
      ======================================================================
      ###@###.### 11/3/04 20:39 GMT

            Unassigned Unassigned
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: