com@debian:~/Documents/deb/build$ sudo dpkg -i test.deb
(Reading database ... 140893 files and directories currently installed.)
Preparing to unpack test.deb ...
Unpacking test (1.0-1) ...
dpkg: error processing archive test.deb (--install):
trying to overwrite '/usr/share/man/man1/test.1.gz', which is also in package coreutils 9.1-1
Processing triggers for man-db (2.11.2-2) ...
Errors were encountered while processing:
test.deb
The test is a linux command which checks file types and compares values. the manual has been existed in directory man1.
For your app, you should give a different name which does not exist in man1
The test is a linux command which checks file types and compares values. the manual has been existed in directory man1.
For your app, you should give a different name which does not exist in man1
...because you don't specify the /opt/ destination at any point. I mean, packages can install things to many different directories, there's nothing magic about /opt/ that makes it the default if not specified.
You might have misunderstood the --dest flag, or perhaps something is missing from the command.
I have zero experience, as I stated in other thread, in making debs - but I feel this can't be correct...
...because you don't specify the /opt/ destination at any point. I mean, packages can install things to many different directories, there's nothing magic about /opt/ that makes it the default if not specified.
You might have misunderstood the --dest flag, or perhaps something is missing from the command.
--dest flag is where the generated deb file is store. It works correctly.
If you check the Oracle documentation, jpackage by default creating the package to be install to opt/appname.
My question is, what is the correct structure to create the package. i.e what launcher files go to /bin, what goes to /lib and so on.
Can we make use of the output from B4JPackager11 (with packager.json) to build the package file?
My question is, what is the correct structure to create the package. i.e what launcher files go to /bin, what goes to /lib and so on.
Can we make use of the output from B4JPackager11 (with packager.json) to build the package file?
If you're able to share your test.deb, I can take a look at it with gdebi and see if it says anything that might be relevant. Beyond that I don't know that I can be of more help.
I opened it with gdebi-gtk, and it doesn't protest at all so as far as I can tell this is a valid package. Running the Lintian test produces numerous error messages, but that's pretty much par for the course, as far as I can tell. For comparison I opened a deb for Apache Netbeans that I happened to have nearby, and it also produces lots and lots of error messages. Installs just fine.
If the problem is related to javafx you could make your test even more basic: Make your Hello World app a console app, so javafx doesn't even come into play.
(I did not try to install your deb. I would have to have a test machine for that, and I don't have one nearby.)
It should be stable now. Have you build your packages first under the Linux system that you are trying to use jpackage on? According to the guide linked in you wish, it states:
Application packages must be built on the target platform. The system used for packaging must contain the application, a JDK, and software needed by the packaging tool.
The B4JPackager source should be somewhere on the forum. You should be able to build it in the target platform, then build your app via it, then use jpackage. And no, I've not done this, just going by what I'm reading (and I may have dabbled with this in the past when jpackage was broken).
I am unable to create a .deb file from jar using jpackage. https://docs.oracle.com/en/java/javase/21/jpackage/packaging-tool-user-guide.pdf I need a tool similar to B4JPackager11 that can create a deb file so it is easy to install in Debian Linux.
Better to start with the integrated packager: https://www.b4x.com/android/forum/threads/integrated-b4jpackager11-the-simple-way-to-distribute-standalone-ui-apps.117880/ B4JPackager11 is a B4J non-ui program that builds a package with your app jar and an embedded modularized Java runtime. It...
Actually I have successfully created the deb file using dpkg.
The problem is many directories are not writable.
The best writable directory is home/USER but I won't know what is the user's directory name.