Executive summary: how do I install a new root certificate into Java using Java code?
We have a desktop application which accesses various web services. Recently one
Sun published this code to create an updated version of your cacerts file based on any target host running https with any certs:
https://code.google.com/p/java-use-examples/source/browse/trunk/src/com/aw/ad/util/InstallCert.java
Your new cacerts will be named jssecacerts in the current directory. Just copy that new file over your jre/lib/security/cacerts file.
I make no comment about the security of your new cacerts file.