R
Rob
Can anyone help me understand why this is not working:
Here is the important part. When compiled and run:
String Urlx="https://domain.com" // valid URL that comes up fine in a
web browser
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
URL url = new URL(Urlx);
in = url.openStream(); // Currently An IoException is thrown
:
It appears an IoException is thrown: java.io.IOException: Server
returned HTTP response code: 403 for URL: https://domain.com
Does anyone know why this might be happening and what if anything is
missing? e.g missing .jar file? A different way to accomplish this in
Java JDK?
Here is the important part. When compiled and run:
String Urlx="https://domain.com" // valid URL that comes up fine in a
web browser
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
URL url = new URL(Urlx);
in = url.openStream(); // Currently An IoException is thrown
:
It appears an IoException is thrown: java.io.IOException: Server
returned HTTP response code: 403 for URL: https://domain.com
Does anyone know why this might be happening and what if anything is
missing? e.g missing .jar file? A different way to accomplish this in
Java JDK?