Source from
here
Add this library to classpath(following is maven project)
Add following line before access https resource:<dependency>
<groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk16</artifactId> <version>1.46</version> </dependency>
Security.addProvider(new BouncyCastleProvider());
...
HttpClient client = ...
HttpGet get = new HttpGet("https://domain")
client.execute(get,repsonse);
...