title: How to use a file in a jar as javax.net.ssl.keystore?
body: <p>I'm trying to do something like </p>
  
  <pre><code>URL clientks = com.messaging.SubscriptionManager.class.getResource( "client.ks" );
  String path = clientks.toURI().getPath();
  System.setProperty( "javax.net.ssl.keyStore", path);
  </code></pre>
  
  <p>Where client.ks is a file stored in com/messaging in the jar file that I'm running.</p>
  
  <p>The thing that reads the javax.net.ssl.keyStore is expecting a path to the client.ks file which is in the jar. I'd rather not extract the file and put in on the client's machine if possible. So is it possible to reference a file in a jar?</p>
  
  <p>This doesn't work as getPath() returns null. Is there another way to do this?</p>