Index: src/main/native/prefs/windows/PreferencesImpl.c =================================================================== --- src/main/native/prefs/windows/PreferencesImpl.c (revision 480046) +++ src/main/native/prefs/windows/PreferencesImpl.c (working copy) @@ -351,7 +351,7 @@ jint *errArray = (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy); - err = openRegKey (env, jpath, jUserNode, &hKey, KEY_QUERY_VALUE); + err = openRegKey (env, jpath, jUserNode, &hKey, KEY_CREATE_SUB_KEY); if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] = checkErrorCode (err)) != java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)