Gostaria de saber porque meu browser encontra a URL abaixo e o programa java
n�o.


import java.net.*;
import java.io.*;

public class URLConnectionReader {
    public static void main(String[] args) throws Exception {
        URL yahoo = new URL("http://www.uol.com.br");
        URLConnection uc = yahoo.openConnection();
        uc.setDoOutput(true);
        uc.setDoInput(true);
        uc.setAllowUserInteraction(false);
        String query = "";
        DataOutputStream dos = new DataOutputStream(uc.getOutputStream());

        // Send the data
        dos.writeBytes(query);
        dos.close();


        // Read the response
        DataInputStream dis = new DataInputStream(uc.getInputStream());
        FileOutputStream file = new FileOutputStream("logo.html");
        String nextline;
        while((nextline = dis.readLine()) != null) {
                System.out.println((nextline));
                
        }
        dis.close();

    }
}

    --------------------------- LISTA SOUJAVA ---------------------------
    http://www.soujava.org.br  -  Sociedade de Usu�rios Java da Sucesu-SP
    [para sair da lista: http://www.soujava.org.br/forum/cadastrados.htm]
    ---------------------------------------------------------------------

Responder a