Keytool

Generate private key (will do self-signed cert as well)

keytool -genkey -alias my_alias -keyalg RSA -keystore my_keystore.jks -keysize 2048

Create CSR from keystore

keytool -certreq -alias my_alias -keyalg RSA -file my_certreq.csr -keystore my_keystore.jks

Import Certificate

cat my_cert.pem intermediate-ca.pem root-ca.pem > fullchain.pem
keytool -import -keystore my_keystore.jks -alias my_alias -file fullchain.pem 

List Certificates

keytool -list -keystore my_keystore.jks -v