Use the following command in importing a certificate to Java keystore:

The keytool is normally found in $JAVA_HOME/jre/bin (i.e. the $JAVA_HOME variable is where you've installed JDK).

keytool -importcert -alias <ALIAS> -v -keystore <KEYSTORE_FILE> -file <INPUT_FILE> -storepass <KEYSTORE_PASSWORD>
Token Description
ALIAS Alias name of the entry to process
KEYSTORE_FILE The target key store file (e.g. cacerts found in $JAVA_HOME/jre/lib/security)
INPUT_FILE Input file name (i.e. certificate file like cer, crt or pem)
KEYSTORE_PASSWORD The password for accessing the keystore (i.e. the default is changeit)