If you are not familiar with the Java keytool command, check out our Getting Started article.
The export option can be used to export a certificate from a keystore. Some aliases have spaces, so it is usually a good pratice to place double quotes around the alias name.
keytool -export -alias "alias name" -file example.crt -keystore "/path/to/keystore" -storepass "keystore_password"
If the keystore is a pkcs12 / p12 file, include the following option.