问题
In my user home directory there is a .keystore
file. Whenever I do keytool -list
I get:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 0 entries
However while running junit tests from Eclipse, the JVM is always referring to this keystore. How can I change this path to another keystore path, for example, C:\Users\abc123\jdk1.8.0_65\jre\lib\security\cacerts
from Eclipse.
I have tried
Debug As --> Debug Configuration --> Junit --> VM arguments
-Djavax.net.ssl.trustStore="C:/Users/b91255/jdk1.8.0_65/jre/lib/security/cacerts "
-Djavax.net.ssl.trustStorePassword="changeit"
I am getting a certification chaining error. How can I ask eclipse to use C:\Users\abc123\jdk1.8.0_65\jre\lib\security\cacerts
as the SSL keystore?
回答1:
in addition to @Tushar Patels answer, this is like
go to eclipse.ini file and edit:
-vmargs
-Djavax.net.ssl.trustStore="C:/Users/b91255/jdk1.8.0_65/jre/lib/security/cacerts "
-Djavax.net.ssl.trustStorePassword="changeit"
回答2:
You can set this in eclipse.ini file which will be in the root of the eclipse folder.
来源:https://stackoverflow.com/questions/44130840/ssl-keystore-path-in-eclipse