jpackage on MacOs: app from pkg cannot write files and create directories inside itself

Andrey Volkov andvolkov at gmail.com
Fri Sep 6 12:49:32 UTC 2019


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".

-- 
Best regards,
Andrey Volkov


More information about the core-libs-dev mailing list