Redirecting to core-libs-dev (with a Bcc to code-tools-dev)
Code signing for macOS, along with the addition of notarization, has been improved for JDK 15. You might want to try the EA builds of JDK 15, which are available here:
https://jdk.java.net/15/ -- Kevin On 5/1/2020 8:13 AM, Adam Carroll wrote:
Using JDK 14.0.1 on the Mac, jpackage fails when signing is requested. This problem was observed using AdoptOpenJDK. I reported the problem to that project and they suggested that I report the problem here. Platform: Mac OS Catalina v10.15.4 Architecture: x86 Description: This problem was seen using AdoptOpenJDK 14.0.1+7. Using the Mac signing option for jpackage ... --mac-sign ... I see the following error (extra path information removed): /var/folders/rh/...../HelloFX.app: is already signed However, if the --mac-sign option is removed, the build works without a problem. Reproducing the problem: I've created a minimal, single-class JavaFX application along with the necessary scripts to reproduce the problem: https://github.com/AdamCarroll/jdk14-jpackage-mac First clone the repo: $ git clone g...@github.com:AdamCarroll/jdk14-jpackage-mac.git Checkout the tag: $ git checkout 1.0.0 Run the build (very fast as there's only one class): $ ./gradlew clean build Now run the jpackage command with the --mac-sign option as follows (this is included in the file bin/create-signed-dmg.sh): $ jpackage \ --type dmg \ --module-path 'build/modules' \ --verbose \ --add-modules javafx.controls \ --input 'build/libraries' \ --dest "build/bundle" \ --name HelloFX \ --main-jar 'jdk14-jpackage-mac.jar' \ --main-class 'demo.HelloFX' \ --mac-sign You will now see a long error that includes the following: /var/folders/rh/...jdk.incubator.jpackage..../HelloFX.app: is already signed java.io.IOException: Command [codesign, -s, Developer ID Application: Your Name Here (XXXXXXXXXX), -vvvv, /var/folders/rh/...jdk.incubator.jpackage.../HelloFX.app] exited with 1 code at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.Executor.executeExpectSuccess(Executor.java:73) at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.IOUtils.exec(IOUtils.java:179) at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.IOUtils.exec(IOUtils.java:150) ... If you now run the same command but without the --mac-sign option (or alternatively use the script bin/create-unsigned-dmg.sh), everything works without problems. You can find the original issue report to the AdoptOpenJDK repository here: https://github.com/AdoptOpenJDK/openjdk-build/issues/1718