How do I import an existing Java keystore (.jks) file into a Java installation?

Ok, so here was my process:

keytool -list -v -keystore permanent.jks – got me the alias.

keytool -export -alias alias_name -file certificate_name -keystore permanent.jks – got me the certificate to import.

Then I could import it with the keytool:

keytool -import -alias alias_name -file certificate_name -keystore keystore location

As @Christian Bongiorno says the alias can’t already exist in your keystore.

Leave a Comment