Loading...

Copy contents of Java Keystore to another Keystore

Copy all certificates from one keystore to the keystore of the current Java installation. You can use the keytool and srckeystore (source keystore) and destkeystore (destination keystore).

For Windows

cd %JAVA_HOME%
bin\keytool -importkeystore -srckeystore wildcard.keystore -srcstorepass changeit -destkeystore jre\lib\security\cacerts -deststorepass changeit

For Linux

cd $JAVA_HOME
bin/keytool -importkeystore -srckeystore wildcard.keystore -srcstorepass changeit -destkeystore jre/lib/security/cacerts -deststorepass changeit