Fabrizio Giudici wrote:
>My personal approach is that my application makes use of a "workspace",
>that is a directory where many files are stored about the users' projects
>(for instance, a JavaDB database, etc). I'm working to have the
>preferences stored in a special file in the workspace (the Preferences API
>allows you to do this by using a custom-provided SPI (*)), while the
>"standard" preferences (those stored in
>~/Library/Preferences/com.apple.java.util.prefs.plist) are used only for a
>single setting, that is the current workspace location.
I agree with this approach, and I recommend it.
If a custom SPI isn't wanted, there are other approaches, such as
Properties files, XML, binary, etc. It all depends on what's being stored
and the amount of interoperability one expects.
Even when I use a workspace, I don't necessarily store everything in that
workspace. Sometimes it's useful to store multiple smaller parameters in
the "standard" Preferences node. Again, it depends on the nature of a
workspace, such as whether it might be shared or copied to another
platform, machine, or user.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden