Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Where should my application save its data files?

843810May 14 2009 — edited Aug 21 2009
Every operating system has a preferred default folder for saving data files generated by an application. On my Mac, it is users/<username>/library/application support/<application name>. On Windows, it is somewhere inside Documents and Files.

Is there a way to determine this folder in Java?

If at all possible I want my application to automatically load its data files at start up, and save them on exit, without prompting the user for a location. But the default folder appears to be the folder containing the jar, which is not the best choice for the platform.

-Ron.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2009
Added on May 14 2009
7 comments
789 views