1

please help me and excuse any mistakes it's late and i've been trying all sorts of solutions as i dont like bothering people if i can help it, but i've hit a brick wall.

I've recently tried to access the debug keystore created by the Eclipse SDK in order to use the Google maps API within my application. Now i know the file exists and have its path. However to access it and recieve an MD5 fingerprint i have to use a keytool command. Now i've been told that this command has to be done in the computers command prompt as there is no keytool GUI. And this is where the problem is as my command prompt doesnt recognise the command im giving it. Here's the command

keytool -list-alias androiddebugkey-keystore(path_to debug_keystore).keystore-storepass android -keypass android

(Brackets should be left and right arrows) to which command prompt replies

keytool is not recognised as an internal or external command, operable program or batch file. Now i tried manually entering the path which i believe would be (C:\Users\Adam.android\debug.keystore).keystore i've also tried variations of C:\Adam.android\debug.keystore).keystore Adam.android\debug.keystore).keystore .android\debug.keystore).keystore debug.keystore).keysotre

which it then replies "the system cannot find the path specified"

So either command prompt doesn't recognise the command "keytool" or im entering the path wrong (which is likely as i dont use command prompt commands often enough to know how to write paths successfully

Lastly i rang one of my more techy friends and he said it's because i'm running on Windows 7 and that most of the command functionality was ripped out in the windows 7 OS and i'll have to revert to Vista. i'm skeptical on this as i cant believe that all android programmers are restricted to Vista.

If anyone has experienced this or knows how to solve it please help as im determined to get over this but have truly hit a brick wall.

so to summarise

im unable to use keytool to access the debug keystore (or create my own for that matter) and cannot find a solution

Thanks for all help in advance and i pray someone helps me as i do enjoy programming and dont want to be stopped at such a small thing.

Thanks for reading Adam

Adam
  • 13
  • 1
  • 3
  • [errorkeytool-is-not-recognized][1] [1]: http://stackoverflow.com/questions/6211919/errorkeytool-is-not-recognized-as-an-internal-or-external-command-operable-p – M.Ganji Apr 09 '15 at 19:43

2 Answers2

3

Keytool is part of Java and you should find it in your Java installation's bin/ folder. Try looking for it in C:\Program Files\Java\jre6\bin (or similar if you have the JDK instead).

Jerry Brady
  • 3,050
  • 24
  • 30
  • Thanks for the quick reply. i found it straight away but when i run the keytool application it runs a prompt which disappears immediately after it appears. So im not sure what i can do with that. What should i do with it now? – Adam Jan 18 '11 at 14:40
  • Run "keytool.exe --help" from a command prompt window. If you don't see the help for the command, I would re-install Java. If you are running your command directly from a Run... dialog, then the shell won't stay up after the command completed. – Jerry Brady Jan 18 '11 at 14:53
  • ok managed to navigate to the java bin file and run the keytool help function. Now it recognises keytool but as i thought im getting the path wrong i typed the command – Adam Jan 18 '11 at 15:44
  • Whoop! done it! just has to navigate to the Java\bin there i could run the help like you said and then i could use the keytool command and was able to get the certificate fingerprint. Thanks alot couldnt have done it without you. Google should really make this clearer or it might just be me. Thanks again for all the help – Adam Jan 18 '11 at 15:59
0

Make sure to type the file path (C:\Users...) with .keystore so if your end of path is debug.keystore, you should have ...\debug.keystore.keystore without the angle brackets. It took a while for me to figure that out.

joergl
  • 2,850
  • 4
  • 36
  • 42
Zehra
  • 1