title: Ignore certificate errors when requesting a URL in Java
body: <p>I'm trying to print a URL (without having a browser involved at all) but the URL is currently throwing the following:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I'm calling the URL using a JEditorPane's setPage method, which just takes a URL as a parameter. Assuming I can't change anything server side and I still need to get to this resource, how would I go about ignoring the certificate error (or something else that gets me to my goal)?</p>
  
  <p>Accessing this URL via a browser tells me the site is untrusted and asks me if I want to proceed. </p>