I've seen people suggest /var/lib but that doesn't work on my system. Every sub-directory of /var is read-only except for /var/lock and /var/log.
Do I just need to write a Linux shell script to grant superuser access? Or is there a Java based solution?
/bin and /usr are both system file directories, so I don't want (nor can I) store files there.
As long as the application needs only to operate within the user I can use:
System.getProperty("user.home") + File.separator + ".appname"'
for the data directory.
But what about persistent system-wide data? Where does that go?
Extra Note: I have this problem with MacOS too. I can use /user/Library/Application Support for user-specific data but I have no way to access global directories.
Second Note: I am aware of and have used the Preferences API. I'm looking for a way to store data excluding that.