how to solve javax.net.ssl.ssl.HandShakeException Error

ssl

 

To solve the error, download the SSL certificate  and import it into the  Java virtual machine's(JVM) trust store.

 

Switch to the JDK's security directory and run the following command.

 

cd JAVE_HOME\jre\lib\security


JAVA_HOME\bin\keytool -import -alias <cert_alias> -file <cert_location> -keystore cacerts -storepass <changeit> 

 

Answer the question  with "Yes".

 

The execute the java program again and the Hand shake should be successful.

 

 

To update the certificate when it expires, delete then reimport it.

 

To delete, execute the command

keytool -delete -alias mydomain -keystore keystore.jks