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

1) Go to Command prompt
2) Generate MD5 Key using java keytool.
3) Fill the information for the key.
4) Get the md5 key.
5) Register it with google.
6) Get the API Key from The google.
7) Use the API key in your application

Description

1) In windows start command promt :
press “ Widow key + r” run diaolg will apear
type cmd and press enter
OR
Press widows key then in search bar type cmd select command prompt from the list.
Then change directory to jdk/bin
e.g c:/…./java/jdk.16/bin

2) Enter the following command…
keytool –genkeypair -alias (alias_name) -keypass (password)
e.g. keytool -genkeypair -alias andy -keypass android

Android MapView Generate API key Using JAVA Keytool

3) Fill the information form.

Android MapView Generate API key Using JAVA Keytool

After running the above command you will find .keystore file generated at your home folder
C:\Users\…\.keystore

4) Run the following command to get Certificate fingerprint (MD5):
keytool -list -alias -keystore .keystore
e.g. keytool -list -alias andy -keystore c:\Users\..\.keystore

Run the following command to get Certificate fingerprint (MD5)

Android MapView Generate API key Using JAVA Keytool

5) After getting the key, register the key with google, on the following link
http://code.google.com/android/maps-api-signup.html

After getting the key, register the key with google, on the following link

6) Follow the steps and you will get the API key.

Follow the steps and you will get the API key

7) Use that key in your android/iPhone application.

Use that key in your android/iPhone application

For detailed use of key tool go to following link

http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html