Preferences : Java Glossary
home P words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish 2008-03-03 by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
Preferences
java.util.prefs.Preferences first appeared in Java 1.4.1 as way to store configuration data for applications and individual users.

Advantages of Preferences

Disadvantages of Preferences

Use

systemNodeForPackage lets you specify Preferences for the whole machine for each package. userNodeForPackage lets you specify Preferences for a particular user for that package. If the package is used in more than one context, e.g. the same class used in two different programs or the same class is used to manage two separate sets of files, it is up to you to create another level of name to keep track of the context. Note though you specify a class name, the Preferences are on a per package, not a per class basis.

The registry will be more legible with regedit if you stick to lower case keys and values since upper case values are encoded in a bizarre fluffy way.

Location

Tips

Learning More

The Replicator uses the Preferences mechanism to persist configurations option for the client as does Submitter and VerCheck. You can examine the source code to see a real world application.
Sun’s Javadoc on the Preferences class : available:

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] The information on this page is for non-military use only.
You are visitor number 10,034. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/preferences.html J:\mindprod\jgloss\preferences.html