Context:
So I\'m trying to access an HTTPS site from my Java code but I am not able due to an SSL Handshake issues between my localhost and the serv
You should be able to import the server (self-signed?) SSL certificate onto your localhost using the command you specified. To be more complete, you can try
$JAVA_HOME/bin/keytool -import -alias mycertificate -keystore path_to_keystore -file certificate_file
where
$JAVA_HOME
on Mac is /System/Library/Frameworks/JavaVM.framework/Home/
path_to_key_sotre
is $JAVA_HOME/lib/security/cacerts
certificate_file
is where you store the downloaded certificateIf prompted, the default truststore password is changeit
.