Can't open url stream!?

Hi there everybody,

Can anyone help me with this...

I was trying to retrive the content from a url with the code below,
try {
URL url = new URL("http://finance.yahoo.com:80/");
}
catch (Exception e) {
e.printStackTrace();
}
BufferedReader reader = new BufferedReader(
new InputStreamReader(url.openStream())
);

But, when I ran the program compiled with no error, it just came out with abundance of exceptions... like

java.io.IOException: Error writing to server
......

Is there anything wrong with program? Does this code ran on windows ME cos I am using ME?

Comments

  • it is posible that you are behind a firewall or using a proxy server. if so, that might be the cause of the errors.


    : Hi there everybody,
    :
    : Can anyone help me with this...
    :
    : I was trying to retrive the content from a url with the code below,
    : try {
    : URL url = new URL("http://finance.yahoo.com:80/");
    : }
    : catch (Exception e) {
    : e.printStackTrace();
    : }
    : BufferedReader reader = new BufferedReader(
    : new InputStreamReader(url.openStream())
    : );
    :
    : But, when I ran the program compiled with no error, it just came out with abundance of exceptions... like
    :
    : java.io.IOException: Error writing to server
    : ......
    :
    : Is there anything wrong with program? Does this code ran on windows ME cos I am using ME?
    :

    Ghassan A.
    checkout==> http://groups.yahoo.com/group/thesaudiFriends

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion