title: Can't load a jks file from classpath
body: <p>I've created a JKS file with public and private RSA keys. When I load this file using external path (like c:/file.jks), the program executes like a charm. However, if I try load this same file from classpath, I got this exception:</p>
  
  <pre><code>java.io.IOException: Invalid keystore format
  </code></pre>
  
  <p>This is the code used to load the jks:</p>
  
  <pre><code> KeyStore keyStore = KeyStore.getInstance("JKS");
   InputStream stream=this.getClass().getResourceAsStream("/lutum.jks") ;
   keyStore.load(stream,passe);
  </code></pre>
  
  <p>the only difference is that I use FileInputStream with full path when loading externally.
  What I'm doing wrong?</p>