If your objective is to establish an SSL ClientAuth session between a web-site and a program you've written in Java, then no, there is no other way to do this.
What you're seeing is just half the equation for the SSL protocol - ServerAuth - where the client program determines which Certificate Authority (CA)'s certificates it will trust to establish an SSL session with on the remote side.
You will also need a keystore with a private-key and digital certificate for your application client, and configure the remote web-server to REQUIRE client-authentication on the SSL/TLS port. Once you've done both, then you can continue to add code to your Java program that uses the client-certificate and keystore to respond to the ClientAuth part of the SSL session establishment protocol.
Hope that helps.
Joined: Jul 26, 2011
My intention is ask for ServerAuth but my wording is about ClientAuth.
Now with what you explained and clarified, I got 2 answers for 1 question.