I am on a Windows platform with a JDK 16.0.1 environment. I created a jar file of my java code by using Java with Ant on my NetBeans. These are the command lines that I used to create DEB file from the jar file:
jpackage --input D:\Fida\Codeblocks\Java\Projects\MultipleClass\dist\MultipleClass.jar --name Multiple Class --main-jar D:\Fida\Codeblocks\Java\Projects\MultipleClass\dist\MultipleClass.jar --main-class parent.Parent --type deb --java-options 'enable-preview'
Here, the input attribute is where my jar file exists. The name attribute is what should be the name of the DEB file once produced. The main-jar attribute is also the location of the jar file that I want to convert to DEB. The main-class attribute is the main class of the jar file, in this case 'parent.Parent.' I got it from the Manifest.mf in the jar file. The type attribute is what I want to convert the jar file, in this case 'deb.' Finally, the options attribute(which I don't understand. I just copy-pasted the whole command from this site).
But when I hit enter, I get this error: Error: Invalid Option: [Class].
And I am sure that there is a mistake somewhere. I even ran the same command on my Linux system with the same JDK version. Then I got this:
java.nio.file.FileAlreadyExistsException: /tmp/jdk.jpackage16852425662219297051/images/src/MultipleClass/lib/app
I don't know what do now. Besides the solution to this error, I would also appreciate any other suggestions for converting jar to Linux executables.