3

Is there a way to add -Djavax.net.ssl.trustStore option on java -jar execution ? I don't want to set it inside environment variable. I'm not sure but I've tryed the following script but it doesn't work.

java -jar MyClass.jar -Djavax.net.ssl.trustStore=C:\path\to\CertKeyStore

Thank your for your help !

1 Answer 1

3

Options must go before -jar. From the command line help:

java [-options] -jar jarfile [args...]

So it's:

java -Djavax.net.ssl.trustStore=C:\path\to\CertKeyStore -jar MyClass.jar
Sign up to request clarification or add additional context in comments.

1 Comment

“You also need to escape backslashes.” No, you don’t. At least, not in Windows. In fact, you shouldn’t.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.