Skip to content
𝓒π“ͺ𝓼𝓽𝓻𝓲𝓳π“ͺ

Share the knowledge

𝓒π“ͺ𝓼𝓽𝓻𝓲𝓳π“ͺ

Share the knowledge

How to add SSL certificate to JRE

Posted on September 19, 2021December 10, 2023 By sastrija

If you are getting SSLHandshakeException while accessing secure URLs, you will need to add the SSL certificate for that URL to your JRE.

Use below steps to add SSL certificate to JRE (Checkout Downloading SSL Certificate From a URL if you are looking for steps to download the SSL certificate from a URL)

  1. Open a Command Prompt
  2. Go to β€œbin” directory of your JRE
  3. Use keytool command as follows to import the certificate to JRE. Use default password “changeit” if you didn’t change it or use the password which you set.
    keytool -import -alias <CERTIFICATE_ALIAS> -keystore <PATH_TO_JRE>\lib\security\cacerts -file <PATH_TO_CERTIFICATE_FILE>

Tips

  • Keytool is located inside the bin directory of your jdk

Related

Java/J2EE J2EEJavaSSL

Post navigation

Previous post
Next post
©2026 𝓒π“ͺ𝓼𝓽𝓻𝓲𝓳π“ͺ | WordPress Theme by SuperbThemes