I have a Java application that runs on Mac and Windows, directly off a CD/DVD with no installation. Now, I need to store a file containing per-user data (think favourites etc.) somewhere on the local file system, so that it can be written to.
So, where do you think is a good location for this file? I am thinking something like:
/application data/myapp/favourites.db for windows
/.myapp/favourites.db for mac/nix
Thoughts?
And does anyone know the best way to determine these paths within Java?
解决方案
System.getProperty("user.home")