kaikramer / keystore-explorer

KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner.
https://keystore-explorer.org/
GNU General Public License v3.0
1.7k stars 275 forks source link

KSE 5.4.3 - MacOS Catalina - Fails To Launch / Cannot Find JRE. KSE 5.4.2 Works? #208

Closed jiriteach closed 4 years ago

jiriteach commented 4 years ago

KSE 5.4.3 fails to launch on MacOS Catalina. Fails with the message - "unable to load java runtime environment"

After trying to debug, I decided to download KSE 5.4.2 and works fine.

I've tried re-installed JDK's and JRE's but didn't helped.

kaikramer commented 4 years ago

Which JDKs/JREs are installed on your system? Especially which one works with KSE 5.4.2? You can check this in Help menu -> „System Information“, „Java Home“

jiriteach commented 4 years ago

I orignally had JDK 13 so then tried 11 and then 8. None of them worked. Then tried OpenJDK 13 via AdoptOpenJDK and didnt work either.

Downgraded KSE to 5.4.2 with OpenJDK 13 installed and it works fine.

jiriteach commented 4 years ago

By the way, just tried it on one of my other Macs, no JDK/JRE's installed. I install JDK 13 from AdoptOpenJDK. Tried KSE 5.4.3 and recieved the error that it could not find the java runtime environment. Tried KSE 5.4.2 and works fine.

kaikramer commented 4 years ago

That's pretty strange. The macOS launcher hasn't changed between 5.4.2 and 5.4.3.

What has changed is that KSE 5.4.3 is notarized by Apple now (which is their new requirement for signed applications) and therefore has to be signed with --options=runtime (hardened runtime).

I have found the following statement by Oracle that their JDK is not certified for Catalina yet because of problems with the notarization, but I don't know how old this is: https://www.oracle.com/technetwork/java/javase/using-jdk-jre-macos-catalina-5781620.html

A quick test with AdoptOpenJDK before the official release of KSE 5.4.3 showed no irregularities.

Also I am not sure if the notarization really could cause this error. If the notarization actually is the cause for this, I can simply sign the macOS package again without --options=runtime.

jiriteach commented 4 years ago

I did see that about notarization and it could be related. Install follows through fine once gatekeeper is disabled or the install is allowed. JDK seems fine but something is causing KSE 5.4.3 not to find the JRE/JDK.

I'm using 5.4.2 for now and its working OK.

tentena commented 4 years ago

Same here! New version could not find the JRE. I had to roll back to v5.4.2, which works fine.

System Information:

image
kaikramer commented 4 years ago

I was able to replicate this issue in a fresh installation of macOS Catalina. Not sure why 5.4.3 has no problems finding the Java runtime on my MacBook.

kaikramer commented 4 years ago

I have signed the release again without --options=runtime. This fixes the problem that the launcher doesn't find the JRE anymore. But it also means that KSE is not notarized anymore...

jiriteach commented 4 years ago

Just tested and it works fine. Thanks

kaikramer commented 4 years ago

@Jiriteach Thanks for reporting!