这是一个文件,其内容显然会导致问题:C:\Program Files\Java\jdk1.7.0_05\bin\raystore
生成密钥时
keytool -import -alias company -file
CompanyCer.cer -keystore
raystore -storepass abcdefgh
仔细检查它是否确实在同一位置生成了一个文件。
然后,
keystore "/home/ray/raystore"; // make sure you reference the path to the key you generated in the previous step
// A sample policy file that lets a program
// create demo.ini in user's home directory
// Satya N Dodda
grant SignedBy "company" {
permission java.util.PropertyPermission
"user.home", "read";
permission java.io.FilePermission
"${user.home}/demo.ini", "write";
};
编辑:
生成密钥
keytool -genkey -keystore mykeys -storepass abc123
标志罐
jarsigner -keystore mykeys -storepass abc123 app.jar johndoe
http://docs.oracle.com/javase/tutorial/deployment/jar/signing.html