How to set KeyStore and trustStore path within a jar

Viewed 1212

I have keystore and truststore files which i want to keep inside a executable jar. In IDE i put these file in a /main/resources/ and was getting a path from there by using ClassLoader, But within a jar file can only be load as a stream. Is there any possibility to get a path of these file as i need to create it SslContextFactory which only get a absolute path rather than a stream?

2 Answers
Related