I am reading an development guide of Facebook Developers at here
It says that I must use keytool to export the signature for my app such as:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
I do not know how to find the keytool in order to run it. I tried to open a Windows command prompt and paste the above command, but it did not work.
Robby Pond
's answer can be generalized to useJAVA_HOME
environment variable and to also compensate for any blanks that might occur in the path (likeProgram Files
):The KeyTool is part of the JDK. You'll find it, assuming you installed the JDK with default settings, in
$JAVA_HOME/bin
Simply enter these into Windows command prompt.
The base password is
android
You will be presented with the
MD5
,SHA1
, andSHA256
keys; Choose the one you need.Depending on your version of Eclipse ( I am using Kepler). Go to Windows> Preferences>Android> Build.
You'll find the location path of your debug keystore as well as the SHA1 fingerprint (which you can just copy and use)
On cmd window (need to run as Administrator),
only works if you have set up your system environment variable JAVA_HOME . To set up your system variable for your path, you can do this
Then, you can type
or
Then, execute any commands provided by JAVA jdk's, such as
You just have to answer the questions (equivalent to typing the values on cmd line) after hitting enter! The key would be generated
Keytool is part of the Java SDK. You should be able to find it in your Java SDK directory e.g. C:\Program Files\Java\jdk1.6.0_14\bin