Use following command to create a public/private keypair using java keytool command. keytool -genkey -keyalg RSA -alias mykeystore -keystore keystore.jks -validity 30 -keysize 2048 Once you run the command follow the steps to complete generation of keypair, make sure you remember the password that you provide during generation.
Fun Drive with Technology