views:

2878

answers:

2

On Windows, the Java preferences, which you access in your application from java.util.prefs.Preferences are stored in the registry. Where are those stored on Mac OS X?

+6  A: 

From Apple Developer Connection:

The preferences files generated by the Preferences API are named com.apple.java.util.prefs. The user’s preferences file is stored in their home directory (~/Library/Preferences/). The system preferences are stored in /Library/Preferences/ and are only persisted to disk if the user is an administrator.

tgamblin
A: 

Also, note that if the preference is nested enough, it won't directly be in com.apple.java.util.prefs, but rather in its own file. For instance, if you have a node /a/b/c, the key/value pairs for that node will be stored in a.b.c.plist.

The file will be either in ~/Library/Preferences/ or /Library/Preferences/, as for the com.apple.java.util.prefs file.

References: java-dev post by Greg Parker

Alessandro Vernet