jpackage usage

Andy Herrick andy.herrick at
Wed Jan 16 19:21:46 UTC 2019

1.) using --input (-i) without also using --files (-f) means every file 
in the input directory (. in this case) will be added to the bundle.  
This may be fine if you are in a working directory with just what you 
want. ) in this case where --input and --output dirs are both the same, 
running the command twice would bundle up an app containing the 
installer from the first run as well.  I had never tried having both -i 
and -o be the same dir - but doing that now gives no problem, I can 
create an installer, install it, and run the installed app.
2.) If you are getting an installer that installs find, but then app 
doesn't I would back up and run create-image first and see if the 
executable runs.
Also, if you jar has a Main-Class attribute (and it must since you can 
run "java -jar helloWorld.jar") you shouldn't really need the -c 
(--class) option.  Is that really the correct main class (you can try 
running "java -classpath helloWorld.jar HelloWorld".


On 1/14/2019 4:36 PM, Skillzore Gaming wrote:
> Hi!
> I am trying out jpackage from I have been trying to figure out how to get it to build a working exe file.
> I have a helloWorld.jar built by gradle which is runnable and runs fine with "java -jar helloWorld.jar". But when I try to use it to build an exe file, the resulting installation (from the built exe file) does not work as expected.
> I build the exe file with
>        jpackage.exe create-installer exe -n "hello" -j helloWorld.jar -o . -i . -c HelloWorld
> It installs just fine, but when trying to run the resulting hello.exe nothing happens. I think that I am doing something wrong in the creation of the exe. I am a bit unsure of what the -o, -i and -c parameters are intended to do and that is probably where I fail.
> Any insight would be appreciated since I am hoping to use this on a larger project later and the interwebs do not have much information on this as of yet.
> Regards, Simon

More information about the core-libs-dev mailing list