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
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