Add HTTPS support for the java target

Closes #2682
Merge pull request #2686 from singpolyma/java-https

Add HTTPS support for the java target