I'm trying to use Java Preferences from XML WITHOUT using Windows registry, but I see a Registry-related message

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.

java
registry
preferences
asked on Stack Overflow Aug 10, 2013 by casgage • edited Jul 21, 2017 by Cœur

2 Answers

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.

answered on Stack Overflow Nov 8, 2013 by casgage
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?

answered on Stack Overflow Nov 8, 2013 by Ian Fairman • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0