I need to create application for my customer, and one part from app uses https connection:
public static void getVersions() throws IOException, ParserConfigurationException, SAXException {
URL u = new URL(VERSION_URL);
HttpsURLConnection c = (HttpsURLConnection) u.openConnection();
c.setRequestMethod("GET");
c.setDoOutput(true);
c.connect();
InputStream in = c.getInputStream();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = null;
builder = factory.newDocumentBuilder();
Document d = builder.parse(in);
}
But when I try to use it I will got IO Exception: "No trusted certificate java". It's service of my customer, all is legal. How can I fix this bug?