0

I have a simplified program that produces the following output, in which the lines starting with ^ are generated by my code. Note that I deliberately deleted the Prefs key in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft.

^ A preferences file was found
Aug 09, 2013 2:45:23 PM 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.
^ doallunconditionally: false
^ footnotespopup: false
^ thumbnailsgenerated: true
^ thumbnailwidth: 200
^ pathin: C:/Users/Das/Google Drive
^ pathout: C:/Users/Das/ottmar/site
^ pathlog: C:/Users/Das/ottmar/logs

My question is, can I bypass the registry entirely? I thought I should be able to.
I can post the source code (180 lines) if needed.

Cœur
  • 37,241
  • 25
  • 195
  • 267
casgage
  • 529
  • 1
  • 7
  • 18

2 Answers2

0

I eventually discovered a workaround (not a solution) to this problem. As I stated before, I had inadvertently/foolishly deleted the Prefs node in Software\JavaSoft in the Registry, and when I recreated it the message went away.

I now assume that the Windows registry is used whether you like it or not.

casgage
  • 529
  • 1
  • 7
  • 18
0

This page explains how to use a preferences store apart from the Windows registry:

http://www.davidc.net/programming/java/java-preferences-using-file-backing-store

I've not tried it but it seems to be fairly straightforward. You can also checkout:

Is there a way to use java.util.Preferences under Windows without it using the Registry as the backend?

Community
  • 1
  • 1
Ian Fairman
  • 625
  • 5
  • 11