code: public static PublicKey loadPublicKeyFromKeyStore(String location,String alias,String storeType,String storePass,String keyPass){
          try {			
          	storeType = null == storeType ? KeyStore.getDefaultType() : storeType;
          	keyPass = keyPass == null ? storePass : keyPass;
          	KeyStore keyStore = KeyStore.getInstance(storeType);
          	InputStream is = new FileInputStream(location);
          	keyStore.load(is, storePass.toCharArray());
          	
          	RSAPrivateCrtKey key = (RSAPrivateCrtKey) keyStore.getKey(alias, keyPass.toCharArray());
  			RSAPublicKeySpec spec = new RSAPublicKeySpec(key.getModulus(),
  					key.getPublicExponent());
  			PublicKey publicKey = KeyFactory.getInstance(KEY_ALGORITHM).generatePublic(spec);
              return publicKey;
  		} catch (Exception e) {
  			throw new RuntimeException(e);
  		}
      }
docs: 从KeyStore获取公钥
  @param location
  @param alias
  @param storeType
  @param storePass
  @param keyPass
  @return