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

Preferences.userRoot causes Error on Windows with User privilege

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta
    • x86
    • windows_nt
    • Verified

      On Windows NT, Preferences.userRoot() causes the following Error.

      Exception in thread "main" java.lang.InternalError: Could not open/create prefs
      root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
              at java.util.prefs.WindowsPreferences.<init>(WindowsPreferences.java:202)
              at
      java.util.prefs.WindowsPreferences.<clinit>(WindowsPreferences.java:84)
              at
      java.util.prefs.WindowsPreferencesFactory.userRoot(WindowsPreferencesFactory.java:28)
              at java.util.prefs.Preferences.userRoot(Preferences.java:309)
              at PrintPrefs.<init>(PrintPrefs.java:9)
              at PrintPrefs.main(PrintPrefs.java:5)

      This error is not observed if the user has the Administrator privilege. To reproduce the problem, compile the attached source code and run "java PrintPrefs", which is supposed to list all preferences.

      naoto.sato@Eng 2000-12-05

            kkladkosunw Konstantin Kladko (Inactive)
            naoto Naoto Sato
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: