Java:无效的密钥库格式错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/126798/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 08:36:33  来源:igfitidea点击:

Java: Invalid Keystore format Error

javakeystore

提问by Campbell

Does anyone know how to solve this java error?

有谁知道如何解决这个java错误?

java.io.IOException: Invalid keystore format

I get it when I try and access the certificate store from the Java option in control panels. It's stopping me from loading applets that require elevated privileges.

当我尝试从控制面板中的 Java 选项访问证书存储时,我得到了它。它阻止我加载需要提升权限的小程序。

Error Image

错误图像

采纳答案by Craig Day

I was able to reproduce the error by mangling the trusted.certs file at directory

我能够通过修改目录中的 trust.certs 文件来重现错误

C:\Documents and Settings\CDay\Application Data\Sun\Java\Deployment\security.

C:\Documents and Settings\CDay\Application Data\Sun\Java\Deployment\security.

Deleting the file fixed the problem.

删除文件解决了问题。

回答by DeeCee

Seems to be a missing certificate or an invalid format. Did you already generate a certificate with keytool?

似乎是缺少证书或格式无效。您是否已经使用 keytool 生成了证书?

回答by rogerdpack

for me it meant that my key file I was trying to import was invalid (it was actually a 404 page not a valid key)

对我来说,这意味着我尝试导入的密钥文件无效(它实际上是一个 404 页面,不是有效密钥)

回答by Jayesh

Do not include special characters in organization name and unit

不要在组织名称和单位中包含特殊字符

回答by Emperor 2052

For you guys who can't find the 'Documents and Settings' (whatever reason there may be) here is another path where the trusted.certs can be found:

对于找不到“文档和设置”(无论出于何种原因)的你们,这里是可以找到 trust.certs 的另一条路径:

C:\Users\<username>\AppData\LocalLow\Sun\Java\Deployment\security

Hope this helps!

希望这可以帮助!