![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2006
Posts: 3
Rep Power: 0
![]() |
J2ME network error
hi! i'm doing a small app for mobile devices, with j2me, netbeans5.0+mobility pack.
the problem is String url = "http://www.google.ro/";
try {
HttpConnection httpConnection =
(HttpConnection) Connector.open(url, Connector.READ);
if (httpConnection.getResponseCode() == HttpConnection.HTTP_OK) {
// i do something around here
}
// doing some more of something
} catch (Exception e) {
e.printStackTrace();
}javax.microedition.io.ConnectionNotFoundException: TCP open this is what i get when the program reaches httpConnection.getResponseCode() . i read that it's because a connection could not be established, or somethink like this, maybe because of a firewall or something else. well, it so happens i connect to the internet through a proxy. but i tried starting the app with parameters like: -Dhttp.proxyHost=192.168.xxx.xxx -Dhttp.proxyPort=8080 yet it still doesn't work. i get the same error. what am i doing wrong? please help. thank you |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Feb 2006
Posts: 3
Rep Power: 0
![]() |
i hope you understand.... what i mean is: i'm sure this code will work properly on a real cellphone, but i need to test it first, on a emulator
unfortunately my computer does not access the internet directly, but through a proxy. how can i test it so that i don't get that annoying error? thanks again |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2006
Posts: 3
Rep Power: 0
![]() |
Help Me Please
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|