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

Reply via email to