Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Java how do you debug exe created by JPackage

I am trying to convert an Windows installation of Java app created with Izpack to use JPackage provided In Java 14. The installer builds and installs, but when I try and run the exe it creates it fails, but gives no information about why it fails.

Is there a log or some way of finding out why it actually fails to start ?

like image 204
Paul Taylor Avatar asked Jun 27 '20 06:06

Paul Taylor


1 Answers

Use jpackage --win-console flag to enable console output, and run your app from CMD.exe so can see any output it writes.

However if you leave jpackage --win-console enabled, console output is ON for every other EXE you add with --add-launcher UNLESS the properties file for the launcher contains the line win-console which turns off console. It doesn't seem to work the other way around.

Its easier to work out what jpackage is doing by making the --main-class a Hello World / dump System properties + env.

like image 98
DuncG Avatar answered Nov 15 '22 13:11

DuncG