Reputation: 4649
We have a Windows Java desktop application that creates some configuration files at %APPDATA%
and creates logs at %TEMP%
location. Now we are planning to release that desktop application for Mac OS X. We are facing following difficulties:
.app
(file extension app) so please suggest where else we can keep our configuration files.%TEMP%
location in Mac OS X because Mac OS X automatically cleans the %TEMP%
location as per schedule. So we do not want data lose from temp and do not want to keep data with in .app. Please suggest.
Thanks
Upvotes: 2
Views: 4605
Reputation: 298838
You should probably put the files under /Library/Application Support/<your app>
or ~/Library/Application Support/<your app>
If the resources apply to all users on the system, such as document templates, place them in
/Library/Application Support
. If the resources are user-specific, such as workspace configuration files, place them in the current user’s~/Library/Application Support
directory.
Source: Determining Where to Store Your App-Specific Files
Upvotes: 5
Reputation: 3454
Either ~/Library/Application Support
or ~/Library/Caches
come to mind. Use the APIs if possible.
Upvotes: 0
Reputation: 240870
We do not want to keep application data within .app (file extension app) so please suggest where else we can keep our configuration files.
Use Preference API
We do not want to keep temporary files at %TEMP% location in MAC OS because MAC OS automatically clean %TEMP% location as per schedule.
Create a dir under user.home
to keep temp data
Upvotes: 2