Can i flush the keystore cache at runtime without restarting the jdk?

I have an application running on jdk. At startup, it reads the keystores and caches their contents.

I now added a CA to my jdk/jre/lib/security/cacerts but the jdk is still not seeing it, because it is keeping the cached info.

How can i flush that cache and request the jvm to re-read the keystore contents?

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

ixarissysadminConnect With a Mentor Author Commented:
i will implement that and tell you how it goes.

schybertConnect With a Mentor Commented:
I'm guessing you are not using a KeyStore object explicitly in your code and what you want is for an outgoing SSL connection to use your updated cacerts file for validating server certificates? In that case I'm pretty sure you can just set the system property and the keystore would be refreshed...

System.setProperty("", "path to cacerts");
All Courses

From novice to tech pro — start learning today.