What is keytool ?
Java Keytool is a key and certificate management utility. It allows users to manage their own public/private key pairs and certificates. It also allows users to cache certificates. Java Keytool stores the keys and certificates in what is called a keystore. By default the Java keystore is implemented as a file. It protects private keys with a password. A Keytool keystore contains the private key and any certificates necessary to complete a chain of trust and establish the trustworthiness of the primary certificate.
Each certificate in a Java keystore is associated with a unique alias. When creating a Java keystore you will first create the .jks file that will initially only contain the private key. You will then generate a CSR and have a certificate generated from it. Then you will import the certificate to the keystore including any root certificates. Java Keytool also several other functions that allow you to view the details of a certificate or list the certificates contained in a keystore or export a certificate.
Note: For easier management of your Java Keystores (using a GUI) check out Portecle. If you need to buy a certificate, try to compare SSL with our SSL Wizard.
Steps to be followed
- Go to Command prompt
- Generate MD5 Key using java keytool.
- Fill the information for the key.
- Get the md5 key.
- Register it with google.
- Get the API Key from The google.
- Use the API key in your application
- In windows start command promt :
press “ Widow key + r” run diaolg will apear
type cmd and press enter
Press widows key then in search bar type cmd select command prompt from the list.
Then change directory to jdk/bin
Enter the following command…
keytool –genkeypair -alias (alias_name) -keypass (password)
e.g. keytool -genkeypair -alias andy -keypass android
Fill the information form.
Run the following command to get Certificate fingerprint (MD5):
keytool -list -alias -keystore .keystore
e.g. keytool -list -alias andy -keystore c:\Users\..\.keystore
After getting the key, register the key with google, on the following link
- Follow the steps and you will get the API key.
- Use that key in your android/iPhone application.
For detailed use of key tool go to following link