0

我在 eclipse 中创建了一个项目,并在尝试从命令提示符构建项目时询问以下内容:

[signjar] jarsigner error: java.lang.RuntimeException: keystore load: C:\Documents
and Settings\Gopakumar\.keystore (The system cannot find the file specified)


[signjar] Enter Passphrase for keystore:
BUILD FAILED
D:\Score\build.xml:556: The following error occurred while executing this line:
D:\Score\build.xml:147: jarsigner returned: 1

我在项目目录中使用 keytool 创建了密钥库文件,正是 build.xml 所在的位置。

但它不提示输入密码?

4

1 回答 1

1

试试看:使用“keytool”命令创建一个 StoreFile:

keytool -genkey -keystore YourKeyStoreFileAtPojectDirectory -storepass YourPassStoreString -keyalg rsa -alias YourKeyString -keypass YourPassKeyString -validity 99999  -storepass YourPassStoreString -dname "cn=XXYYZZ, o=XXYYZZ, l=YourCity, S=YourState, c=YourCountry"

并将signjar块放在你的build.xml中:

<signjar destDir="signed" 
  alias="YourKeyString" 
  keypass="YourPassKeyString"
  keystore="YourKeyStoreFileAtPojectDirectory"
  storepass="YourPassStoreString"
  digestalg="SHA1"
  sigalg="MD5withRSA"
>
于 2014-02-07T18:15:55.193 回答