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