Import JKS file into Java cacert

Created: 8 September 2025  Modified:

Command to import all certs from a JKS file into JDK cacert file

The default password for JDK cacert files is “changeit”

List Aliases/Certificates in JKS file

$ keytool -list -keystore C:\Software\dod-cacertsv5.6.jks -storepass changeit

Import JKS file

$ keytool -importkeystore -srckeystore C:\Software\certs.jks -destkeystore C:\Software\Apps\temurin-17.0.13\lib\security\cacerts -srcstorepass changeit -deststorepass changeit
tags: java - jdk - cacert - jks - keytool
   Less Is More