how to add cert to java keystore

how to add cert to java keystore
refer to:‮uttual‬ri.com
keytool -importcert -file certificate.cer -keystore keystore.jks -alias "Alias" 
keytool -import -trustcacerts -keystore cacerts -storepass changeit -noprompt -alias yourAliasName -file path\to\certificate.cer
Created Time:2017-08-30 09:24:09  Author:lautturi