How to ignore PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException?
问题 I got the following exception when try to post a request to a http server: Here is the code I used URL url = new URL( "https://www.abc.com"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); conn.setDoOutput(true); DataOutputStream wr = new DataOutputStream(conn.getOutputStream()); // wr.writeBytes(params); wr.flush(); wr.close(); BufferedReader br = new BufferedReader(new InputStreamReader( conn.getInputStream())); String line = null; while (