jpackage: better error messages when things go wrong ?
jon.harper87 at gmail.com
Fri May 17 10:06:36 UTC 2019
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
( from the article
to show the actual Exception, its message and stacktrace in the
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?
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found )
- maybe you have spaces in your paths:
- maybe your favorite dependency management tool produced a broken
classpath and some vital jars are missing (ClassNotFoundException:
- maybe the jpackage your are using has a bug and produces a broken
image https://bugzilla.redhat.com/show_bug.cgi?id=1700884 (
Note: This is from javapackager from jdk8 from which the behavior in
jpackage is inherited.
More information about the core-libs-dev