I want to package my java application as a Debian Package. I'm using the build-in native packager of netbeans(8.0.1) for Deb-Packages
Following output after packing: Execute failed: java.io.IOException: Cannot run program "command" (in directory
"/home/testuser/Songs"): error=2, No such file or directory /home/testuser/Songs/nbproject/jfx-impl.xml:3415: The following error occurred while executing this line: /home/testuser/Songs/nbproject/jfx-impl.xml:3584: Error: JavaFX native packager requires Debian Packager tools to create DEB package, but dpkg could not be found. BUILD FAILED (total time: 1 second)
I have installed the dpkg-dev with apt-get. the $PATH variable contains /usr/bin
I don't know how to fix that problem. anyone has an idea why netbeans does not find dpkg?
I solved the problem overriding the target -check-dpkg-presence define in nbproject/jfx-impl.xml.
The original target looks for "command" file in the project folder. The row check the real path of dpkg. Running command -v dpkg you get /usr/bin/dpkg.
This is the same beavoiur you get if you try the line
which dpkg ==> /usr/bin/dpkg
So i do this in build.xml
I change the attribute (executable='which') and the line attribute of the arg tag.
And it works.