Java 21 jpackage creates Windows installers that cannot be signed
Alan Bateman
Alan.Bateman at oracle.com
Fri Feb 16 11:41:47 UTC 2024
On 16/02/2024 09:23, Craig Raw wrote:
> 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.
It looks like you've come to the wrong place, the jpackage tool was not
developed here. I can't tell from your mail if this is an issue with
jpackage in JDK 21 or an issue with the Windows signtool. If you can
provide instructions on how to reproduce this then it would be great if
you could submit a bug via bugs.java.com which it will be moved into the
OpenJDK Java Bug System if it looks like a JDK bug.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jigsaw-dev/attachments/20240216/3209f324/attachment.htm>
More information about the jigsaw-dev
mailing list