Connecting to an https URL is easy in java. Just create a URL object and you are ready to go. If you need to provide a client certificate it gets a little more complicated to get right. You have to create a properly set up SSLSocketFactory to establish an authenticated connection. Next, you need to load the PKCS12 certificate into a keystore and provide that store to the SSLContext.
If the client certificate was issued by your private CA you also need to
make sure the full certificate chain is in your JVMs keystore.