I'm trying to sign a JAR file. I generated a new store using the
"keytool -genkey -alias myStore -keystore mainstore"
And the store got generated with the actual name "mainstore" under my Windows user directory.
I then try to self sign the JAR file using
"jarsigner myApp.jar myStore".
But I'm getting error:
jarsigner error: java.lang.RuntimeException: keystore load: C:\Users\myusername \.keystore (The system cannot find the file specified)
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?
Thanks in advance.
As the manual page for
jarsigner
states:Which means that in Windows,
C:\Users\myusername\.keystore
is the default keystore file.So what you probably need to do is tell
jarsigner
where your keystore is located:Your file might not be deleted, I was having the same problem and updating to the latest jdk solved my problem.