I want to use the java.util.Preferences API but I don’t want my program to attempt to read or write to the Windows registry. How would I go about this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I trust you have read the read/write to Windows Registry using Java and you then want to have another back-end than the registry when using the
java.util.PreferencesAPIYou could extend the
PreferenceAPI, like Bernhard or Croft did, as described in this article:Examples of extensions through new
Preferencescan be seen here.That is better, IMO, than to use another API.
For instance, searching for classes extending
java.util.prefs.AbstractPreferences:de.unika.ipd.grgen.util.MyPreferencesde.tarent.ldap.prefs.LDAPSystemPreferencescom.adito.boot.PropertyPreferences: