Running a Java program with Full Disk Access on macOS 10.14
Answered
Is it possible to run a Java program under IDEA on macOS 10.14 with Full Disk Access permission?
Please sign in to leave a comment.
The program is executed with the permissions of the user who started the IDE.
Full Disk Access is a permission granted to applications, not users.
I see what you mean. Generally Full Disk Access should not be required for the IDE. But if your project or library or tools you are using in it are located under user home directory you may get prompts for access to calendar, contacts, photos, etc, see e.g. https://youtrack.jetbrains.com/issue/IDEA-199737#focus=streamItem-27-3082509-0-0 If these prompts get annoying or you just do not want to see them at all it should be safe to add IDE to Full Disk access. Otherwise feel free to file a particular issue for such case, see https://intellij-support.jetbrains.com/hc/en-us/articles/360001849319.
Although those links are describing a different problem (IDEA accessing protected files directly), it seems that adding IDEA to Full Disk Access works in my case.
One difference is that before I added IDEA to FDA, my program would not open a dialog, it would get a runtime error (Operation Not Permitted).
I think there is a larger issue here. macOS is becoming a system that caters to bundled applications with their custom Info.plists, something that the bin/java executable with its fixed embedded Info.plist cannot simulate. (If you have tried to use the native dark mode, you will have experienced this.) Perhaps IDEA should support creating a thin bundled app when it tries to run a Java program. I would be happy to file an issue if this idea has not already come up.