Here you can find the source of getKeyStoreFromFile(String filePath, char[] password)
public static KeyStore getKeyStoreFromFile(String filePath, char[] password) throws Exception
//package com.java2s; /**/*ww w .j a va 2 s . c o m*/ * License: https://github.com/votingsystem/votingsystem/wiki/Licencia */ import java.io.FileInputStream; import java.security.KeyStore; public class Main { public static KeyStore getKeyStoreFromFile(String filePath, char[] password) throws Exception { KeyStore store = KeyStore.getInstance("JKS"); store.load(new FileInputStream(filePath), password); return store; } }