Rest 正在为AsyncHttpClient设置SSLContext-无法读取密钥库文件

Rest 正在为AsyncHttpClient设置SSLContext-无法读取密钥库文件,rest,playframework,ssl-certificate,Rest,Playframework,Ssl Certificate,我需要在我的play应用程序中使用AsyncHttpClient对https协议进行POST调用。我正在使用Play2.2.x版本。 我尝试了在下面问题的第一个答案中提到的@Esfand代码,但在java.io.FileNotFoundException中失败了 以下是我所做的: 1我使用keytool命令在我的C驱动器上生成密钥库。。像这样的 keytool-import-trustcacerts-alias mypublickey-file-keystore c:\mypublicstore

我需要在我的play应用程序中使用AsyncHttpClient对https协议进行POST调用。我正在使用Play2.2.x版本。 我尝试了在下面问题的第一个答案中提到的@Esfand代码,但在java.io.FileNotFoundException中失败了

以下是我所做的: 1我使用keytool命令在我的C驱动器上生成密钥库。。像这样的

keytool-import-trustcacerts-alias mypublickey-file-keystore c:\mypublicstore.jks“

它将文件存储在名为mypublicstore.jks的C驱动器上。请注意末尾的双引号

2然后我用下面的代码来阅读

    KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
    KeyStore keyStore = KeyStore.getInstance("JKS");
    InputStream inputStream = new FileInputStream("C:\\mypublicstore.jks\"");
    String certPass = Play.application().configuration().getString("certificate.password");
    keyStore.load(inputStream, certPass.toCharArray());
    keyManagerFactory.init(keyStore, certPass.toCharArray());


    But it is failing at line 3 of the code. It can not find the file on the system. I tried reading another file on the same location and it works fine then why it can not read jks" type of file? Am I doing something wrong here?
在FileInputStream中,我应该给出密钥库路径还是证书路径?
提前感谢您的帮助。

我发现AHC不能与play 2.2.x版本一起使用。我需要升级到2.3.x版本