Keytool错误java.io.FileNotFoundException(系统找不到指定的文件)
Keytool error java.io.FileNotFoundException(the system cannot find the file specified)
keytool error: java.io.FileNotFoundException: api.sepa.express.crt (The system cannot find the file specified)
我尝试了在 Whosebug 中找到的各种示例。
keytool -importcert -file certificate.cer -keystore keystore.jks -alias "Alias"
和
keytool -import -alias susan
-file Example.cer -keystore exampleraystore
尝试以管理员身份使用 cmd。我已将我的证书文件放在 Desktop 中。当我尝试复制时:
C:\Program Files\Java\jdk1.8.0_60\jre\lib\security
它不接受证书文件。
完成此命令的首选方法是什么?
尝试使用命令提示符添加 ssl 文件。它对我有用
只需在 c: 驱动器以外的任何其他目录中创建文件
例如:在 d: Drive
中创建
首先将证书下载到您的任何目录中,我选择 (D:\My) 我将证书保存在名称为 xyz.cert
.
的位置
其次,你应该是 CMD/Command 的管理员并写下“keytool”这个词,它应该给你输出:
Key and Certificate Management Tool
命令:
-certreq Generates a certificate request
-changealias Changes an entry's alias
-delete Deletes an entry
...something like this should be the output
第三,由于所有证书都保存在目录中的“cacerts”中-
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security
从目录 -
使用以下命令
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security
keytool -import -alias clojars.org -keystore /cacerts -file
D:/My/xyz.cer
在哪里可以找到什么:
- 当您双击证书时(xyz.cert 在我的例子中)它
将打开一个弹出窗口,您可以在“常规”选项卡中找到“颁发给”
:
clojars.org
(这个名字你需要在-alias前面给出)
- -keystore 前面应该是cacerts的路径,但是我们是
已经在目录
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security
中,所以我们可以给出
/cacerts
- 文件 --> 证书位置
如果它要求输入密码,默认是 changeit,所以每次都保持相同
希望这能解决您的问题。 :)
1.Advice: 运行 命令提示符作为管理员(如果您使用的是 windows 7,您可以转到 运行,键入 cmd 并按 Ctrl+Shift+输入。这将在管理员模式下打开命令提示符。)
2.C:...... > keytool -importcert -file "C:part/to/file.crt" -keystore "%JAVA_HOME%\jre\lib\security\cacerts" -alias 1别名
(不要忘记带有 .crt 的文件)
3.password - 改变
- y - 是的。
keytool error: java.io.FileNotFoundException: api.sepa.express.crt (The system cannot find the file specified)
我尝试了在 Whosebug 中找到的各种示例。
keytool -importcert -file certificate.cer -keystore keystore.jks -alias "Alias"
和
keytool -import -alias susan
-file Example.cer -keystore exampleraystore
尝试以管理员身份使用 cmd。我已将我的证书文件放在 Desktop 中。当我尝试复制时:
C:\Program Files\Java\jdk1.8.0_60\jre\lib\security
它不接受证书文件。
完成此命令的首选方法是什么?
尝试使用命令提示符添加 ssl 文件。它对我有用
只需在 c: 驱动器以外的任何其他目录中创建文件 例如:在 d: Drive
中创建首先将证书下载到您的任何目录中,我选择 (D:\My) 我将证书保存在名称为 xyz.cert
.
其次,你应该是 CMD/Command 的管理员并写下“keytool”这个词,它应该给你输出:
Key and Certificate Management Tool
命令:
-certreq Generates a certificate request
-changealias Changes an entry's alias
-delete Deletes an entry
...something like this should be the output
第三,由于所有证书都保存在目录中的“cacerts”中-
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security
从目录 -
使用以下命令
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security
keytool -import -alias clojars.org -keystore /cacerts -file D:/My/xyz.cer
在哪里可以找到什么:
- 当您双击证书时(xyz.cert 在我的例子中)它
将打开一个弹出窗口,您可以在“常规”选项卡中找到“颁发给”
:
clojars.org
(这个名字你需要在-alias前面给出) - -keystore 前面应该是cacerts的路径,但是我们是
已经在目录
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security
中,所以我们可以给出 /cacerts - 文件 --> 证书位置
如果它要求输入密码,默认是 changeit,所以每次都保持相同
希望这能解决您的问题。 :)
1.Advice: 运行 命令提示符作为管理员(如果您使用的是 windows 7,您可以转到 运行,键入 cmd 并按 Ctrl+Shift+输入。这将在管理员模式下打开命令提示符。)
2.C:...... > keytool -importcert -file "C:part/to/file.crt" -keystore "%JAVA_HOME%\jre\lib\security\cacerts" -alias 1别名 (不要忘记带有 .crt 的文件)
3.password - 改变
- y - 是的。