Connecting to internet

When I try to connect to the internet via java i'm getting a

Error in accessing URL: java.net.SocketException: Network is unreachable: connect

I'm trying to read the HTMLCode. The class works perfectly at home but at my university I am facing difficulties.

This is what I'm using:

URL urlAddress =new URL(urlString);

URLConnection connection = urlAddress.openConnection();

inStream =new BufferedReader(new InputStreamReader(connection.getInputStream()));

Can this be fixed? What would I need to use?

Thank you.

[670 byte] By [java4life87a] at [2007-11-27 9:44:43]
# 1
You need to contact your uni's system admin. Chances are you are behind a proxy.
ita6cgra at 2007-7-12 23:51:59 > top of Java-index,Java Essentials,Java Programming...
# 2
> The class works perfectly at home but at my university I am facing> difficulties.freedom at the university and at home are different, so maybe network security in your school is tight your connection is maybe block
Yannixa at 2007-7-12 23:51:59 > top of Java-index,Java Essentials,Java Programming...
# 3
If I am behind a proxy (which I probabally am as you said); and the university supplies me with what I need. What (in code) would I do?Thank you
java4life87a at 2007-7-12 23:52:00 > top of Java-index,Java Essentials,Java Programming...
# 4
> and the university supplies me with what I> need. What (in code) would I do?if the university grant you access then you can use your code.Your code works perfectly in your home so it should work in you university.
Yannixa at 2007-7-12 23:52:00 > top of Java-index,Java Essentials,Java Programming...
# 5
Yeah as mentioned your uni will have to unblock your pc (which is relatively simple to do but is a security issue) and you probably wont need to do anything else.
ita6cgra at 2007-7-12 23:52:00 > top of Java-index,Java Essentials,Java Programming...
# 6
Is it not that your firewall is blocking also? Do you not have to allow javaw.exe access to the Internet?
_helloWorld_a at 2007-7-12 23:52:00 > top of Java-index,Java Essentials,Java Programming...
# 7
If you need to use a proxy, your uni will tell you the details and you should be able to set the proxy parameters as explained here: http://java.sun.com/j2se/1.5.0/docs/guide/net/proxies.html
Herko_ter_Horsta at 2007-7-12 23:52:00 > top of Java-index,Java Essentials,Java Programming...