当我想打开密钥库时出现此异常
java.io.FileNotFoundException: \resources\keystore (The system cannot find the path specified)
基本上我的应用程序就像
src/
client.java
server.java
resources/
keystore
truststore
和错误的代码:
System.setProperty("javax.net.ssl.keyStore","/resources/keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "redacted");
我还尝试了 ./resources/keystore、resources/keystore、\\resources\\keystore 等。
我的应用程序应该在一个可执行的 jar 中工作,所以请不要使用绝对路径技术。