Howdy, Stranger!

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

Categories

Can't open url stream!?

derrick_tehderrick_teh Member Posts: 3
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

  • javakiddojavakiddo Member Posts: 31
    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

  • Justin BibJustin Bib USAMember Posts: 0

    ________ | http://forcoder.org | free ebooks and video tutorials about ( C JavaScript Visual Basic C++ PL/SQL Swift Go R Assembly Python Scratch Delphi C# PHP Ruby Visual Basic .NET Java Perl Objective-C MATLAB SAS Dart Scheme Transact-SQL LabVIEW Logo FoxPro COBOL Scala Prolog Clojure Awk Crystal Erlang VBScript Lisp Julia Alice Fortran Ada Lua ML Hack Bash ABAP D Kotlin Apex Rust F# ) _____________

Sign In or Register to comment.