java.io.IOException: Invalid Keystore format

前端 未结 10 1506

Does anyone know how to solve this? I tried many things, but none of them worked.

And when I click more details I get this:

at sun.security.provider.         


        
10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 01:26

    (Re)installing the latest JDK (e.g. Oracle's) fixed it for me.

    Prior to installing the latest JDK, when I executed the following command in Terminal.app:

    keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -v
    

    It resulted in:

    keytool error: java.io.IOException: Invalid keystore format
    java.io.IOException: Invalid keystore format
        at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
        at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
        at java.security.KeyStore.load(KeyStore.java:1445)
        at sun.security.tools.keytool.Main.doCommands(Main.java:792)
        at sun.security.tools.keytool.Main.run(Main.java:340)
        at sun.security.tools.keytool.Main.main(Main.java:333)
    

    But, after installing the latest Oracle JDK and restarting Terminal, executing the following command:

    keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -v
    

    Results in:

    Enter keystore password:  
    

    Which indicates that the keytool on path can access the keystore.

提交回复
热议问题