cd /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/lib/security/ cp cacerts cacerts.bak sudo keytool -importcert -file myca.crt -keystore cacerts
Thank http://blog.alwold.com/2011/06/30/how-to-trust-a-certificate-in-java-on-mac-os-x/