首页 文章

keytool错误:java.io.FileNotFoundException:C:\ cacerts(访问被拒绝)

提问于
浏览
5

我在Windows 10上使用JRE8,我正在使用的命令是:

C:\Program Files\Java\jre1.8.0_60\bin>keytool -keystore "C:\cacerts" -storepass changeit -importcert -file "C:\Users\MyUser\Desktop\sf.cer" -alias Symantec_Secure_Server_Class_3

这是我到目前为止所尝试的:

  • 给cacerts文件完全访问我的用户(尽管我是管理员)

  • 将密钥工具作为cmd中的系统管理员

  • 将cacerts放在不同的位置(甚至尝试过C:\ cacerts)

我一直得到同样的错误:

证书已添加到密钥库keytool错误:java.io.FileNotFoundException:C:\ cacerts(访问被拒绝)

我还能做什么将此证书导入我的cacerts文件?

3 回答

  • 12

    尝试以管理员身份运行命令行并再次执行

  • 1

    尝试使用另一个驱动器:D:\ tmp或C:\ tmp(除root之外) .

  • 1

    我最终切换到运行Windows 8和JRE7的另一台计算机,它工作正常!

    更新:Windows Defender阻止访问cacerts文件 . 我禁用了砖墙工具,现在一切都很好!

相关问题