ERROR:'keytool' is not recognized as an internal or external command, operable program or batch file

Shalini picture Shalini · Jun 2, 2011 · Viewed 277.6k times · Source

When i use the command

C:\>keytool -list -alias androiddebugkey 
            -keystore .android\debug.keystore 
            -storepass android -keypass android

I get this error:

'keytool' is not recognized as an internal or external command, operable program or batch file.

I'm not able to get the certificate fingerprint(MD5) on my computer.

i have ensured that the keystore file is present in the appropriate location.

Any help?

Answer

Ben Williams picture Ben Williams · Jun 2, 2011

Check that the directory the keytool executable is in is on your %PATH% environment variable.

For example, on my Windows 7 machine, it is in C:\Program Files (x86)\Java\jre6\bin, and my %PATH% variable looks like C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Java\jre6\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0\ (and many other entries)