Hi!!
This is the first time I am trying to access an HTTPS site using
Java.
I installed the latest java sdk1.4.0_01 on my machine.
I downloaded the URLReader.java file from Sun's site and tried to run it, but I am getting the following error:
Exception in
thread "main" javax.net.ssl.SSLHandshakeException: Couldn't find trusted certificate
This is the code:
import java.net.*;
import java.io.*;
public class URLReader
{
public static void main(
String[] args) throws Exception
{
System.setProperty("https.proxyHost","webproxy");
System.setProperty("https.proxyPort","8080");
URL verisign = new URL("https://www.verisign.com/");
BufferedReader in = new BufferedReader(new
InputStreamReader(verisign.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
Please let me know why I am getting this error.
Thanks
Ashwin