0

I am using Netbeans 7.2 IDE with jdk 1.6. My application downloads a file from google drive. When I am running the application in IDE, the file is getting downloaded, but when I do "Clean & build" and run the standalone jar of the application it is giving me the following error:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Tharindu Thisarasinghe
  • 3,846
  • 8
  • 39
  • 70
  • Possible solution https://stackoverflow.com/questions/9619030/resolving-javax-net-ssl-sslhandshakeexception-sun-security-validator-validatore – Abhay Sep 18 '18 at 06:18

1 Answers1

0

This exception show app unable to find valid certification path to requested target, You need to add the certificate for request target(google drive) to the truststore file of the used JVM located at

%JAVA_HOME%\lib\security\cacerts

Once you have the certificate in your hard drive you can import it to the Java trust store. To import the certificate to the trusted Java key store, you can use the java ‘keytool‘ tool. Use keytool command as follows to import the certificate to JRE.

Bhushan Uniyal
  • 5,575
  • 2
  • 22
  • 45