本文介绍了.keystore意外删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试签署一个JAR文件。我使用

I'm trying to sign a JAR file. I generated a new store using the

"keytool -genkey -alias myStore -keystore mainstore"

并且在我的Windows用户目录下用实际名称mainstore生成了商店。

And the store got generated with the actual name "mainstore" under my Windows user directory.

然后我尝试使用

"jarsigner myApp.jar myStore".

但我收到错误:

jarsigner error: java.lang.RuntimeException: keystore load: C:\Users\myusername    \.keystore (The system cannot find the file specified)

我看过,.keystore文件不存在。我认为它被意外删除。有没有办法生成新的.keystore文件?

I looked and the .keystore file is not there. I think it got deleted by accident. Is there a way to generate a new .keystore file?

提前感谢。

推荐答案

由于 jarsigner

As the manual page for jarsigner states:

这意味着在Windows中, C:\Users\myusername\。 keystore 是默认的密钥库文件。

Which means that in Windows, C:\Users\myusername\.keystore is the default keystore file.

所以你可能需要做的是告诉 jarsigner

So what you probably need to do is tell jarsigner where your keystore is located:

jarsigner -keystore mainstore myApp.jar myStore

这篇关于.keystore意外删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 03:07