Hi Andrey,

Writing to  /Application on macOS or "Program Files" on Windows requires admin privileges. It is very uncommon when application stores temp files or setting files modifiable by user inside installation folder. For temp files I will recommend to use system provided temp folder. For setting it will depend on OS type.

Thanks,
Alexander

On 9/6/2019 5:49 AM, Andrey Volkov wrote:
Hello.

I use jpackage (Build 14-jpackage+1-35) to bundle my Swing-based app for
MacOS. Whereas DMG format works pretty well, PGK bundle has a serious
issue. When I install the app from PKG, it cannot write files or create
directories inside itself.
I have /resource directory for my app that has a few settings and temp
directory for file processing. For the app from PKG I get "File not Found
(Permission Denied)" when the app tries to create a directory like
"/Application/MyApp.app/Contents/Java/resources/temp" or any write/create
any file inside  "/Application/MyApp.app/Contents/Java/resources/"
Do you have any clue how to fix it for PKG bundle? I would prefer to use it
because it has a more user-friendly installation.

BTW, Windows has a similar issue when per-user installation works fine, but
a system-wide installation in "Program Files" lack permissions to write
files inside "Program File/MyApp".


Reply via email to