dcsimg
J2ME network error javax.microedition.io.ConnectionNotFoundException: TCP open
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Adam_Heartgrave
Posted On:   Saturday, February 11, 2006 01:15 PM

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.getRespo   More>>

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?



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?



thank you

   <<Less

Re: J2ME network error javax.microedition.io.ConnectionNotFoundException: TCP open

Posted By:   Anonymous  
Posted On:   Saturday, March 18, 2006 06:41 AM

I got the same problem ...:o(( did U found the solution ?
About | Sitemap | Contact