Java: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

前端 未结 23 1571
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-22 04:44

I have a class that will download a file from a https server. When I run it, it returns a lot of errors. It seems that I have a problem with my certificate

23条回答
  •  眼角桃花
    2020-11-22 05:04

    For Windows only, follow these steps:

    1. In Chrome go to settings.
    2. In Settings click show advance settings.
    3. Under HTTPS/SSL Click on Manage Certificates.
    4. Export Your Certificate.
    5. In Windows searchs (Pressing windows key on keyboard) type java.
    6. Select (Configure Java) Option Which will open Java Control Panel
    7. Select Security tab in Java Control Panel
    8. Select Manage Certificates
    9. Click Import
    10. Under (User) tab selected and certificate type as (Trusted Certificates)
    11. Click import button and browse to downloaded certificate and import it.

提交回复
热议问题