You can use a valid certificate that you have already acquired from a CA, or you can use the keytool utility to take you through the following four steps to obtain and import your own certificate:
1. Creating a keystore repository and generating a key
2. Generating a certificate request
3. Importing the CA's root certificate
4. Importing the signed identity certificate to the store