Is it possible to use only Certificate Thumbprint to call a secured localhost rest service in java?

I am trying to access a local rest api deployed by a third party application on my system using java code. The request is a https request so I get a ssl handshake exception when I try to call the rest api using the below code,

HttpClient httpClient = new HttpClient();
HttpGet httpGetRequest;
HttpResponse response;
httpGetRequest = new HttpGet(url);
httpGetRequest.addHeader(HttpHeaders.CONTENT_TYPE, contentType);
response = httpClient.execute(httpGetRequest);

I have gone through a lot of stuff online which suggests adding Self Signed Certificates to java key store, but as the 3rd party application shares the Certificate Thumbprint, I want to use it to somehow dynamically use the Thumbprint to perform the authentication.