Java 21 jpackage creates Windows installers that cannot be signed
Craig Raw
craigraw at gmail.com
Fri Feb 16 09:23:13 UTC 2024
I have recently upgraded from Java 18 to Java 21, and noticed that there
has been a change in jpackage which is causing signtool (the Microsoft code
signing tool) to fail when signing the installer. Even though the installer
.exe can be run on the system, the signtool command fails with:
SignTool Error: SignedCode::Sign returned error: 0x800700C1
This rather cryptic message refers to ERROR_BAD_EXE_FORMAT
<https://markcz.wordpress.com/2013/01/26/signtool-exe-returned-error-0x800700c1/>.
Note that the same build run with Java 18 produces an .exe installer which
does not have this problem.
If I compare the .exe produced by Java 21 with that produced by Java 18
with dumpfile and pestudio, I notice two differences:
1. There is a 'version' section containing application name and version
information which is no longer present
2. The linker version has changed from 1.27 to 1.37
Any assistance is appreciated.
Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jigsaw-dev/attachments/20240216/f7bc86d9/attachment.htm>
More information about the jigsaw-dev
mailing list