jarsigner error: java.lang.RuntimeException: keystore load: Keystore was tampered with, or password was incorrect

If you're quoting the password, try removing the quotes. I experienced this error when using jarsigner in the 1.7.0_25-b17 JDK on Windows 7. I typically use earlier versions of jarsigner on Solaris and Linux and have always quoted the password using single quotes because it often contains characters that are interpreted by the shell.

I haven't verified, but I'm guessing that the shell interpreter on *nix trims quotes before passing the parameters to jarsigner, but the Windows command prompt doesn't.

For example, instead of

jarsigner -keystore /my/cert/file -storepass 'password' /my/jar/file my_alias

try

jarsigner -keystore /my/cert/file -storepass password /my/jar/file my_alias


I had the exact opposite issue to @Peter I had special characters in my password and my signing script kept giving this error until I wrapped the password in double quotes "

I think this was because I was running a batch file to sign my app rather than typing it directly into the command line and windows was getting confused about the special characters in the password.


Check your keystore alias name once. Some times keystore alias name is different from keytool alias name then it gives the same error...So check it alias names once