This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Maybe it's too late, maybe it's not want you want, buttt.
Posted by Gabriel on July 20, 2001 at 7:37 AM
> Hi all
> I am trying to connect to a website and get the details on the page.
> I know i have to use the java.net.* class, but i don't know how to use this and connect
> Does anyone have a sample code that might help me???
> thank heaps
public class readURLTest
public static void main (String args)
System.out.println("Bla bla bla:"+e.getMessage());
or if you want an Applet sample make a class wich extends Applet make an URL use getAppletContext().showDocument(address);
where addres it is the URL like in my sample