Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to dynamically load trustStore and keyStore path?

meandmycodeSep 30 2016

Hi,

I am reading jks properties like trustStore and keyStore path from a file.

When I start my application I can see that the default values are read, at least for trustStore:

keyStore type is : jks

keyStore provider is :

init keystore

init keymanager of type SunX509

trustStore is: /my/java/install/path/SLED11-x86_64/jdk/1.7.0_80/jre/lib/security/cacerts

trustStore type is : jks

trustStore provider is :

Then later on I set the propety values:

System.setProperty("javax.net.ssl.keyStore", keyStorePath.toString());

But it seems that they are not set at runtime.

How can I set these properties at runtime ( not using minus D parameters).

br,

//mike

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 28 2016
Added on Sep 30 2016
0 comments
1,195 views