Brandon McCombs <none@none.com> writes:
I wanted to know what the standard practice is for storing user
settings.
One needs a per-user storage place as a starting point.
I believe, this is:
http://download.java.net/jdk7/docs/api/java/util/prefs/Preferences.html
However, you do not have to store all data there, just
- for example - the name of the file oder database with the
actual user data. See also:
?user.home User's home directory?
http://download.java.net/jdk7/docs/api/java/lang/System.html#getProperties()
Should I be creating a properties file when a user chooses to
save his settings?
Simple name-value pairs are sufficient for a surprisingly
large area of applications. Actually, every information can
be stored this way.
Other means include databases, XML-files or RDF-files. I am
using my custom format ?Unotal?, which is like enriched
S-expressions.
Are there other ways to do this same thing (besides using the
windows registry)?
In Java, there does not have to be a ?Windows registry?
within the runtime environment at all.
thanks guys. I'm already looking into the PReferences API and I like it
(haven't implemented any code yet though). thanks again