I am trying to package my app using jpackage. I'm sure my commands are correct, but it keeps giving me an error, saying that my main jar doesn't exist.
I used jdeps to find the dependencies of my app, and then, I used jlink to create a reduced jre for the app. I checked, and the created jre runs my app. Then, I proceeded to use jpackage to package my app. For this, I wrote the following in the Command Prompt:
C:\Users\user1>jpackage --input \Desktop\Apps --name MathbeeApp --main-jar Mathbee1.jar --main-class main.MainThread --type exe
I also tried to change the type:
C:\Users\user1>jpackage --input \Desktop\Apps --name MathbeeApp --main-jar Mathbee1.jar --main-class main.MainThread --type app-image
But I always get the same errors:
Bundler EXE Installer Package skipped because of a configuration problem: the configured main jar does not exist Mathbee1.jar in the input directory Advice to fix: the main jar must be specified relative to the input directory (not an absolute path), and must exist within that directory
and
Bundler EXE Installer Package skipped because of a configuration problem: the configured main jar does not exist Mathbee1.jar in the input directory Advice to fix: the main jar must be specified relative to the input directory (not an absolute path), and must exist within that directory
respectively.
But I made sure that my jar file is in the directory. I attached a picture of my directory. I don't understand why it says that it doesn't exist. Can somebody help me with this problem?
Thanks to the comments to my question, I was able to figure out that the solution was to make sure the input directory is not in OneDrive. Once I made sure of this, jpackage was able to find the main jar.