How does Java communicate with https service (StartCom plus Nginx)

  java, question

Recently, I applied for a free ssl from startCom and then configured it on my nginx(Nginx (tomcat service of 8080 forwarded by Nginx).

First useunirestWant to get page information, the result reality this error:

Caused by: 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

Later, two crt files of StartCom were imported locally, so this error did not exist.

The question is: if I want others to send a request to this https service through java code, how do I let them get the data normally? -Do I need to share those two crt files?

PS: I found direct java accesshttps://github.comThere is no problem at all.
Please give directions, thank you!

I have played the link of java accessing https before, and remember there are two ways.
One is to install the certificate of that website, similar toImport certificateIt was introduced that at that time, I also realized the simulated login of a ticket website through this way.
The second seems similarBypass certificate, bypassing server certificate detection

clipboard.png