-
Bug
-
Resolution: Fixed
-
P3
-
8u60
-
b123
-
x86
-
windows_7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8216030 | 8u212 | Jan Lahoda | P3 | Resolved | Fixed | b01 |
JDK-8214655 | 8u211 | Jan Lahoda | P3 | Resolved | Fixed | b01 |
JDK-8210913 | 8u202 | Jan Lahoda | P3 | Resolved | Fixed | b01 |
JDK-8212950 | 8u192 | Jan Lahoda | P3 | Closed | Fixed | b32 |
JDK-8221001 | emb-8u211 | Jan Lahoda | P3 | Resolved | Fixed | master |
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The warning:
Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
is printed to stderr. This happens when accessing the userRoot.
This happens at least for jre installations of jre 1.7.0_21 and higher on a 'clean' Windows system. Installation of older jre versions create the key
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs
Versions 1.7.21 and later and 1.8.0 and later do NOT.
Removing older version do not seem to remove the existing HKLM key. That is why this issue only occurs with installations on 'clean' Windows systems.
With an existing HKLM Prefs key, no warnings are generated.
******
This issue was reported earlier, see
It is however reproducible if HLKM\SOFTWARE\JavaSoft\Prefs is not present, like on clean Windows systems or if manually removed.
UAC is enabled, user which installs and runs is member of Administrators.
As I am not able to reopen it, I submit this as a new one with a little more detail on how to reproduce.
ADDITIONAL REGRESSION INFORMATION:
Last worked in 1.7.0_13
JRE 1.8.0 installer does NOT create the HKLM Prefs key
JRE 1.7.0_21 (and higher) installer does NOT create the HKLM Prefs key
JRE 1.7.0_13 installer does create the HKLM Prefs key
_15 and _17 never tested.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Remove
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs
from Windows registry. This 'Prefs' key is present if you ever had an older java version installed.
If you want you can install JRE/JDK 1.8.0_60, the Prefs key will not be created. Running the source code without the Prefs key in HKLM will report the warning.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No warning
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Oct 09, 2015 9:47:43 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package Bugs;
import java.util.prefs.Preferences;
public class PrefsWarning {
void findPrefs() {
Preferences prefs = Preferences.userRoot();
}
public static void main(String[] args) {
PrefsWarning pw = new PrefsWarning();
pw.findPrefs();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Create HKLM Prefs key manually in Windows Registry
- or -
Install (very) old jre before installing a recent one.
- backported by
-
JDK-8210913 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Resolved
-
JDK-8214655 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Resolved
-
JDK-8216030 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Resolved
-
JDK-8221001 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Resolved
-
JDK-8212950 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Closed
- duplicates
-
JDK-8146335 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Closed
-
JDK-8158292 jshell tool: WindowsPerferences warning
- Closed
- relates to
-
JDK-8038489 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Closed
-
JDK-8135254 Install and uninstall of JRE 8 update 60 removes registry HKLM\SOFTWARE\JavaSoft
- Closed