Java uses its keytool to manage the certificates.

The mostly used command is like this: 

keytool –import –file {yourserver.pem} –keystore {youkeystorefile}

where {youserver.pem} is the certification file from your server, and {yourkeystorefile} is the file you used to save the keystores.

Note: the default password for the jdk default keystore file (normal this file located as “$JRE_HOME/lib/security/cacerts”) is “changeit”.

For more information about the keytool command, you can refer to this page.