Fix Java warnings

At past time I’m faced with some unexpected behavior on windows environments. The issue occurs when I’m tried to execute java code which communicate with my windows machine: find-bugs maven plugin or IntelliJ IDEA


[java] WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.

How to fix: create HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs and

Detailed steps:

  1. Open regedit aplication (hint: Win+R -> type regedit -> press Enter)
  2. Navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node
  3. Right click on
    WOW6432Node folder, select New -> Key and type JavaSoft as new key
  4. Create Prefs key within  JavaSoft
  5. Repeat steps 3-4 for 

After above steps we will see this structure structure: