Before publishing an application or before release the application must be signed with a certificate whose private key is held by the application’s developer. Its not necessary that the certificate should be obtained from a certificate authority. Android allows signing the applications using self-signed certificates. The following steps describe the procedure to generate keys that are necessary for signing the application. Make sure you have updated the JRE (Java Runtime Environment). The tutorial explained here is done using system running on Windows 7 with JRE6 installed.
1. Open RUN and type cmd.
2.Goto C:\Program Files\Java\jre6\bin by typing
cd program files
c:\Program Files>cd java
c:\Program Files\Java>cd jre6
c:\Program Files\Java\jre6>cd bin
3.Now the bin folder contains the keytool for generating the key. Type the following command to generate the key using keytool
keytool -genkey -v -keystore (type the folder you want to go followed by keyname.keystore) -alias (specify name that you like) -keyalg RSA -validity 10000
4.After executing the command its prompts for password. Retype the password and fill in the details.
5.Provide password for the alias.
6.The key is generated in the folder specified during the creation.
7.Use the key for signing the android application.