On Mac OS, based on what I understand, you should store the information in "/ Library / Application Support / Your App Name" if the files should be read by everyone. However, when it comes to writing, this is an admin-only folder.
Therefore, if you want to write data, you need to save it in "~ / Library / Application Support / Your App Name". Note the "~" in front. When you do this, each user will have their own data for the application and will be able to read and write.
In Java, if I make a new file ("~ / Library"), this does not work properly. It just adds "~ / Library" to my current folder. Instead, I would like it to return "Users / myAccount / Library". I understand that he suggested that you store the files there .
The question is, how to create a File object in Java to point to this folder?
source
share