OS-independent location to store program files

242 views Asked by At

I'm looking for a platform-independent way of getting a location where my Java program can save files. This location should be user-dependent.

What I want is:

  • %userprofile%\AppData\Local\MyAppName\ on Windows,
  • ~/.local/share/MyAppName/ or something like that on Ubuntu
  • Anything else corresponting so it works on every platform
0

There are 0 answers