// put your keystore file address here
String fileAddress = "C:Program FilesJavajre1.8.0_301libsecuritycacerts"
try(InputStream keyStoreData = new FileInputStream(fileAddress)) {
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
char[] keyStorePassword = "changeit".toCharArray(); // the default password for default keystore
keystore.load(keyStoreData, keyStorePassword);
// ...
}
catch (Exception e) {
e.printStackTrace();
}