Broken Java Key&Trust Store on OSX

Sometimes Java applications do not find the internal Key- and Truststore (where all well known SSL roots are listed). Last one was Minecraft on OS X 10.9 with installed JRE6, JDK7 and JDK8. Even a pre-defined $JAVA_HOME did not help. java.lang.RuntimeException: Unexpected error: the trustAnchors parameter must be non-empty

Hopefully, this fix should help you. 

# Sometimes some Java applications will not work because the internal references to the trusted libs are broken.
# Unless '/System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security' does not exist, this should help
$ sudo mkdir -p /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security
$ cd /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/security/cacerts
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/security/blacklist
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/security/trusted.libraries

Kommentar verfassen