Reputation: 3130
Where should preference files, log files, caches files, database files, go on Mac OS X and how to get those locations from Java?
Upvotes: 3
Views: 657
Reputation: 3130
As per [email protected] list by Mike Swingler
Preferences is explained here: Technical Q&A QA1170 Important Java Directories on Mac OS
Logs should probably go into System.getProperty("user.home") + "/Library/Logs/" + "your.app.identifier".
Caches should either go in the directory returned from System.getProperty("java.io.tmpdir"), or System.getProperty("user.home") + "/Library/Caches/" + "your.app.identifier".
Database files, autosave information, and other things that represent user data that could be lost if deleted should go into System.getProperty("user.home") + "/Library/Application Support/" + "Your App Name".
To request a new tech note, or update the existing QA1170 with this information, please file a request at http://bugreporter.apple.com
Upvotes: 2