jarsigner "Only one alias can be specified"

unmuse picture unmuse · Jan 5, 2012 · Viewed 14.3k times · Source

In Windows command prompt:

>keytool -genkey -alias me
>keytool -selfcert -alias me
>jarsigner myJar.jar me
Only one alias can be specified

I have failed to find any info on this error on the web. I'm obviously only specifying one alias here. What could I be doing wrong?

Answer

Joel Davis picture Joel Davis · Sep 3, 2012

I was getting the same error.

I resolved it by renaming the folders in my path

c:\this is a folder\ replaced with c:\this_is_a_folder\

jarsigner doesn't like spaces in folders