Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify javax.net.ssl.trustStore option on java -jar execution

Tags:

java

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 !

like image 951
user8933752 Avatar asked Jun 05 '26 15:06

user8933752


1 Answers

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
like image 145
Aníbal Avatar answered Jun 08 '26 06:06

Aníbal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!