RFR: 8356684: jpackage error messages are not helpful
Alexey Semenyuk
asemenyuk at openjdk.org
Wed Jan 14 00:50:38 UTC 2026
If the output of an external command execution results in a fatal error, jpackage will print the command line of the external command. In quiet mode (without "--vrebose"), it will also print the command's output.
E.g. (unit test output):
jpackage --input MainTest\testFailedCommandOutput\input --dest MainTest\testFailedCommandOutput\output --name FailedCommandOutputMainTest --type app-image --main-jar hello.jar --main-class Hello --win-console
Error: Unexpected exit code 17 from executing the command jlink-mock --output MainTest\testFailedCommandOutput\output\FailedCommandOutputMainTest\runtime --module-path runtime\jmods --add-modules java.base,jdk.xml.dom,jdk.zipfs --strip-native-commands --strip-debug --no-man-pages --no-header-files
Command output:
It
fell
apart
-------------
Commit messages:
- Update copyright year
- CommandOutputControlTest: improve coverage
- Add CommandOutputControl.ExecutableAttributes.printableCommandLine()
- 8356684: jpackage error messages are not helpful
- Add SelfContainedException annotation to the model. Use it mark exception classes with error messages suitable for presenting to a user without the need to provide an additional context (class name, stack trace).
Changes: https://git.openjdk.org/jdk/pull/29197/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29197&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8356684
Stats: 484 lines in 13 files changed: 412 ins; 47 del; 25 mod
Patch: https://git.openjdk.org/jdk/pull/29197.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29197/head:pull/29197
PR: https://git.openjdk.org/jdk/pull/29197
More information about the core-libs-dev
mailing list