Search code examples
javafxinstallationself-contained

JavaFX Native package for linux


I am trying to create native package in JavaFX8. The main build, installation and execution is working, however I have problem with permissions. Application is installed to /opt (as should always do according to documentation) but with root ownership and permissions set on all files and folders. So if I want to create or download some file within the application, it's not possible due to missing permissions.

I cannot find any solution how to avoid this. Obviously i don't want to force user to change permissions manually. Is there some way how to allow application change files within this folder? Or for such situations installation must be in a different way?

Thanks for any hints


Solution

  • I think I found solution although it still needs some tweaks. When eclipse generated rpm is installed, we can use rpm build tools. Just download and use rpmrebuild -e packagename command in terminal. It is possible to change %attr for each file/folder. After edit, new rpm file is created (somehow smaller, maybe better compression?) and can be distributed further.

    Still don't know how to change root ownership to the user who installs, but for now it's definitely progress.