• Post Reply Bookmark Topic Watch Topic
  • New Topic

Preferences API in windows  RSS feed

 
Janfry Nice
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm thinkig of using the Preferences API.

However, the default implementation of the JDK in windows
goes under the windows registry, and I'd like to centralize
all the config information in the server (in files or database,
preferably). Is there any way to change it? Has the JDK another
implementations avaiables? If not, can anybody tell me about
any open-source projects to choose?

Thanks in advance

Janfry
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the API doc for java.util.prefs.Preferences:
Implementation note: In Sun's JRE, the PreferencesFactory implementation is specified using the system property java.util.prefs.PreferencesFactory, which must be set to the fully qualified name of a class implementing the PreferencesFactory.


So make your own implementation of PreferencesFactory and Preferences and set the system property java.util.prefs.PreferencesFactory on your command line or in your program.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!