Many things can go wrong when launching an app package with jpackage
(1). If the app doesn't work enough to get basic logging, then the
only error message you get is
"Failed to launch JVM" (with javapackager form jdk 8 you also had
"Error Invoking Method"..)

I think it would be a great improvement if more explicit error message
could be shown so that users can provide more details to developers
trying to fix their problems. In almost all cases I saw, there was a
java exception associated with the problem and its message and
stacktrace allowed very easy debugging.

On windows, could the message use the same structure as
https://docs.microsoft.com/en-us/windows/desktop/uxguide/images/mess-error-image43.png
( from the article
https://docs.microsoft.com/en-us/windows/desktop/uxguide/mess-error )
to show the actual Exception, its message and stacktrace in the
details ?

Cheers,
Jon

(1):
A non exhaustive list of problems where an Exception and it's message
(not even the stacktrace) allow to diagnose the problem instantly. The
point is not to highlight these bugs in particular, just that some
problems will always happen.
- maybe your image links to a high glibc version?
https://bugzilla.redhat.com/show_bug.cgi?id=1700927 (
java.lang.UnsatisfiedLinkError:
/tmp/gse-fedo/runtime/lib/amd64/libnio.so:
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found )
- maybe you have spaces in your paths:
https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-May/060096.html
- maybe your favorite dependency management tool produced a broken
classpath and some vital jars are missing (ClassNotFoundException:
FooBar)
- maybe the jpackage your are using has a bug and produces a broken
image https://bugzilla.redhat.com/show_bug.cgi?id=1700884 (
FileNotFoundException: tzdb.dat)

Note: This is from javapackager from jdk8 from which the behavior in
jpackage is inherited.

Jon

Reply via email to