I'm using Java2ME (MIDP2.0) to establish server connections on my device. However, I'm having trouble using the Connector.open method to construct a ServerSocketConnection instance. I use the following code:
I get the following ConnectionNotFoundException: "Cannot create socket, //:80". I do not think this is a security issue: for one, because I don't get a SecurityException, and secondly because I explicitly ask for permission to use ..Connector.socket, ..Connector.http, and ..Connector.serversocket in the JAD file. I haven't tried signing the midlet suite yet, as this would take quite some time and I'm actually just testing some code. I've also tried using another port (and using "serversocket://:80" instead of "socket://:80", more out of desperation); also, I have tried entering "localhost" and "127.0.0.1" in front of the port number, but all to no avail. I have been able to successfully use this method to construct SocketConnection instances, however. Can this be because my particular device (HTC Touch Cruise, JBED build 20080428.2.1) simply does not support server socket connections?
Thanks in advance,
Uh oh, we're definitely being carded. Here, show him this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners