You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fatal error when JAVA_HOME is set incorrectly #472
Operating system (including version): macOS 12.4 (21F79)
mkcert version (from mkcert -version): v1.4.4
Server (where the certificate is loaded): N/A
Client (e.g. browser, CLI tool, or script): N/A
What you did
Ran mkcert -install
What went wrong
Error for reference
$ mkcert -install
The local CA is now installed in the system trust store! ⚡️
ERROR: failed to execute "keytool -list": exit status 1
keytool error: java.lang.Exception: Keystore file does not exist:
I have my JAVA_HOME ($HOME/homebrew/opt/openjdk) set to a user based homebrew location but it seems that neither of the following files exists causing the util to fatally abort.
Thanks @Hacksore I was using jenv https://www.jenv.be/ and it's openjdk64-11.0.15 java version had a path ~/.jenv/versions/openjdk64-11.0.15/libexec/openjdk.jdk/Contents/Home before those sub paths were correct like your fantastic issue summary indicated. openjdk64-11.0.17 or 11.0.17 had the paths needed for this fix.
Activity
[-]Fatal error when `JAVA_HOME` is set[/-][+]Fatal error when `JAVA_HOME` is set incorrectly[/+]Fix Fatal error when `JAVA_HOME` is set incorrectly FiloSottile#472
Hacksore commentedon Oct 30, 2022
I've opened a PR with a fix here #474
fcorneli commentedon Nov 9, 2022
Would be nice if, on Mac OS, every JVM under
/Library/Java/JavaVirtualMachineswould be like "root infected", not only theJAVA_HOMEone.joelpittet commentedon Dec 17, 2022
Thanks @Hacksore I was using jenv https://www.jenv.be/ and it's
openjdk64-11.0.15java version had a path~/.jenv/versions/openjdk64-11.0.15/libexec/openjdk.jdk/Contents/Homebefore those sub paths were correct like your fantastic issue summary indicated.openjdk64-11.0.17or11.0.17had the paths needed for this fix.Hacksore commentedon Dec 17, 2022
@joelpittet glad it helped you.
Still waiting for @FiloSottile to have a look at the open PR to at least warn for this.
Hacksore commentedon Jun 17, 2023
Lost interest in this in favor of caddy. Maybe this will get traction at some point but at least there is a workaround now.