Socket in midp

I wont to use socket connection in my midlet. I couldn't find the way to do this. I tryed to open ContentConnection or Stream connection but than i couldn't open inputstream nor datainputstream. On sun.com i found this code:
package com.sun.midp.io.j2me.socket;
import com.sun.cldc.io.ConnectionBase;
import javax.microedition.io.Connection;
import javax.microedition.io.StreamConnection;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.sun.cldc.io.j2me.socket.Protocol;
public class Protocol extends com.sun.cldc.io.j2me.socket.Protocol
public Connection c;
public Protocol()
super();
System.out.println("Protocol.ConnectionBase() called");
public void open(String uri, int mode, boolean to) throws IOExcepti
c = super.openPrim(uri, 0, false);
System.out.println("openPrim() called");
public InputStream openInputStream() throws IOException {
return super.openInputStream();
public DataInputStream openDataInputStream() throws IOException {
return super.openDataInputStream();
public OutputStream openOutputStream() throws IOException {
return super.openOutputStream();
public DataOutputStream openDataOutputStream() throws IOException {
return super.openDataOutputStream();
i used this but there always comes an exception:
Protocol.ConnectionBase() called
java.lang.IllegalArgumentException
     at com.sun.cldc.io.j2me.socket.Protocol.openPrim(+7)
     at com.sun.midp.io.InternalConnector.openPrim(+231)
     at com.sun.midp.io.InternalConnector.open(+9)
     at javax.microedition.io.Connector.open(+6)
     at javax.microedition.io.Connector.open(+6)
     at javax.microedition.io.Connector.open(+5)
     at KConnection.KConnector.open(+6)
     at KConnection.KConnector.connect(+6)
     at SerwisMain.getK(+18)
     at SerwisMain.startApp(+348)
     at javax.microedition.midlet.MIDletProxy.startApp(+7)
     at com.sun.midp.midlet.Scheduler.schedule(+225)
     at com.sun.midp.dev.DevMIDletSuiteImpl.schedule(+7)
     at com.sun.midp.Main.runLocalClass(+20)
     at com.sun.midp.Main.main(+68)
can anybodey tell me how can i open input and output stream and write and read from them as iwont and how long i wont?
Please help

First: what MIDP Version do you want to use? In MIDP 1.0 there are no sockets available, only HttpConnection and DatagramConnection. For socket use you have to deal with the MIDP 2.0
And in MIDP 2.0 you have a javax.microedition.io.SocketConnection which you can use for that.
// copied from the MIDP 2.0 Javadoc (javax.microedition.io.SocketConnection)
   SocketConnection sc = (SocketConnection)Connector.open("socket://host.com:79");
   sc.setSocketOption(SocketConnection.LINGER, 5);
   InputStream is  = sc.openInputStream();
   OutputStream os = sc.openOutputStream();
   os.write("\r\n".getBytes());
   int ch = 0;
   while(ch != -1) {
       ch = is.read();
   is.close();
   os.close();
   sc.close();you dont have to deal with com.sun.anything packages or classes unless you want to change the implemenation-details of the protocols.
hth
Kay

Similar Messages

  • TCP sockets on MIDP over GPRS

    Extending the CLDC socket.Protocol class I can make a TCP socket connection from a MIDlet. I'm hoping to market my application on GPRS networks, but I'm not sure that it supports TCP connections. I've read that TCP runs on circuit switching networks, and UDP on packet switching networks. I think GPRS is the latter. I need to maintain a constant, "connection-oriented" socket - i.e. TCP. Does anyone happen to know whether TCP/IP will function properly over GPRS? I realise this is why MIDP only implements HTTP and not raw sockets, but I thought it was worth asking anyway. Any help at all would be greatly appreciated.

    Hi Briggsd!
    I'm playing with some sockets.
    can you please help me?!
    J2ME uses only HTTP connections?
    and what are the sockets? what is the difference between CLDC socket and J2SE Socket?
    is there any other way to communicate with a Servlet?
    and very important..
    is there a difference if it's using GPRS or 3G?
    would the http connection work for all? and just the connection speed would change?
    help me!!

  • Socket in Palm OS with MIDP

    Hallo,
    Has anyone create a Socket with MIDP ? If I execute
    Connector.open("socket://MyServer:32123");
    I receive a IOException without any message. What make I wrong?
    Volker

    I have install and test the emulator now.
    I receive in the stderr.txt the follow line
    Host=MyServer, port=32123, Error=4688, errCount=1, openCount=0
    In Java I receive a empty IOException. What this error means? Is there a list of error codes.

  • Mobile-Desktop socket connection

    I have a client program running on a mobile and a server program running on my desktop, I am trying to establish a socket connection between them and send "hello" message from the mobile to the desktop, here are the codes
    Client:
    try{
    SocketConnection sc = (SocketConnection)
    Connector.open("socket://xxx.xxx.xxx.xxx:4444");
    myDisplay.setCurrent(form);
    OutputStream os = null;
    try{
    os = sc.openOutputStream();
    byte[] data = "Hello/".getBytes();
    os.write(data);
    os.flush();
    } finally{
    sc.close();
    os.close();
    } catch (IOException x){
    x.printStackTrace();
    }Server:
    public void Server()
    ServerSocket serverSocket=null;
    Socket clientSocket = null;
    try {
    serverSocket = new ServerSocket(4444);
    clientSocket = serverSocket.accept();
    } catch (IOException e) {
    System.out.println("Could not listen on port: 4444");
    System.exit(-1);
    System.out.println("Connection Established");
    try
    char[] input=new char[1000];
    int i=0;
    char delimiter='/';
    InputStream in=clientSocket.getInputStream();
    while ((input=(char)in.read()) != delimiter){
    System.out.println(input[i]);
    i++;
    in.close();
    clientSocket.close();
    serverSocket.close();
    }catch(IOException e)
    e.printStackTrace();
    }I run the server then I run the client, "Connection Established" message appeares indicating that the desktop successfully accepted the connection request from the mobile, however, the "Hello" message doesn't appear afterwards, nothing appeares after the "Connection Established" message actually, So what has gone wrong?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    You will find that using Sockets with MIDP is going to be hard work for you. (different phones different behavior, and many network providers do all sorts of funny firewalling).
    Are you able to use HTTP instead? E.g. XML over http.

  • A listening J2ME client ???

    How can I implement, that a Java client listens for incoming messages (HTTP, UDP, WAP) and reacts to them? I want to build a database which can be accessed from many users using their Javaphones in some way. If some user changes data, all other connected Java clients should be informed and updated.
    Does that work with WAP PUSH? I realised that the MIDP/CLDC provide UDP, that offers the DatagramConnection interface which can be used in server and in client mode.
    Has anybody some good ideas?

    Hi,
    You'd better read " Advanced MIDP Networking, Accessing Using Sockets and RMI from MIDP-enabled Devices " article on http://wireless.java.sun.com/midp/articles/socketRMI/.
    This article:
    Gives you a brief overview of CLDC and MIDP Networking
    Discusses a middleman architecture for using sockets, RMI, and other Internet services
    Shows you how to use sockets from MIDP-enabled devices
    Shows you how to send emails from your MIDP-enabled device
    Shows you how to use RMI from MIDP
    Take care,
    Faruk

  • Multiple socket connections with MIDP

    dear experts,
    I have a simple problem and I hope someone can help me to solve it.
    I need to open a socket connection from multiple MIDlets on the same port.
    This error occours when I try to make a socket push registration from the second (or third, or fourth...) midlet (I'm able to connect to the socket correctly from the first midlet that makes a push registration):
    PushProcessor.run Exceptionjava.io.IOException: ServerSocket Open
    java.io.IOException: ServerSocket Open
         at com.sun.midp.io.j2me.serversocket.Socket.open(+39)
         at com.sun.midp.io.j2me.socket.Protocol.openPrim(+127)
         at javax.microedition.io.Connector.openPrim(+121)
         at javax.microedition.io.Connector.open(+15)
         at javax.microedition.io.Connector.open(+6)
         at javax.microedition.io.Connector.open(+5)
         at it.myprj.midp.BasicPushMIDlet$PushProcessor.run(+16)
    I would know if push registry API allows to have multiple connection on the same socket port.
    any help is appreciated!
    giovanni

    in my opinion,
    due to the fact when an app binds one port and a second app tries to bind the same (@same time) there will ever be a exception (from my point of view)!
    an no i think that push registry cant register two apps on same port (eg datagram://5060)
    hope this helps
    chris

  • Socket IO on MIDP

    I opened a TCP stream connection between my MIDlet and a server. The connection is established, and what the MIDlet writes to the server is received fine, but when the server writes back an answer (a short test string), it is not picked up by the MIDlet. It waits on read forever, and if available is called on it, 0 is returned. There is no broken connection because netstat shows that this connection is still established. What could be the problem?

    yes, you do get a connection reset if you close the stream, which may be not be what you want if you want information going back and forth. In any case, I found a solution by resorting to an old-fashioned method of sending a termination character and having the receiver watch for it to terminate the read. As for Http vs. socket, if I'm writing a proprietary application authoring both the server and the MIDP client sides, isn't socket stream preferable as you can trim your data excahnge to the bare essentials without all the HTTP protocol-related extras? Also on this subject, do you know if there is some method that's considered the best way to go about having your MIDlet access a website? Is it to have a special proxy or gateway server to intermediate between the MIDlet and the website, parsing away and tailoring the web content for MID-size screens? Like chopping away at an oak tree to carve out a toothpick?

  • Sharp GX15 (MIDP 2.0 without sockets!?!?)

    Hi, im development for a Sharp GX15 (Vodafone), it has MIDP 2.0, but when i try to make a socket
    connection it give me this error "ConnectionNotFoundException: The request protocol not exist socket://server:port".
    I want know if really this mobile dont support sockets or if im doing something wrong (The code work
    with other mobiles)
    Someone know what mobiles with MIDP2.0 has not socket connection?
    Thanks.

    Hi Carlos,
    I came across your post about Sharp GX15 development sw. I am very interested in testing a j2me game into it, I tried several times to pass on this game into the mobile through bluetooth but It always prompts with a "Wrong Data" message. I certainly don't know whether this message is because the game has some features (MIDP, CLDC...) the mobile doesn't support or because the mobile bluetooth is not aimed at passing games from the pc to the mobile.
    As I saw you are experienced in developing software for this mobile you may know what's wrong.
    Thank you in advance.
    David

  • Problem with socket connection in midp 2.0

    hello everyone.
    I'm new one in j2me and I am learning socket connection in j2me. I'm using basic socket,datagram example wich is come with sun java wireless toolkit 2.5. for it i wrote small socket server program on c# and tested it example on my pc and its working fine. also socket server from another computer via internet working fine. But when i instal this socket example into my phone on nokia n78 (Also on nokia 5800) it's not working didn't connect to socket server.. On phone I'm using wi-fi internet. Can anybody help me with this problem? I hear it's need to modify manifest file and set appreciate pressions like this
    MIDlet-Permissions: javax.microedition.io.Connector.socket,javax.microedition.io.Connector.file.write,javax.microedition.io.Connector.ssl,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http,javax.microedition.io.Connector.https
    is it true?
    can anybody suggest me how can i solve this problem?
    where can I read full information about socket connection specifiecs in j2me?
    Thanks.

    Maybe this can be helpful:
    [http://download-llnw.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/index.html]
    you can check there the Datagram interface anda DatagramConnection interface and learn a little about that.
    If the client example runs fine in the wireless toolkit emulator, it should run the same way in your phone; i suggest to try to catch some exception that maybe is hapenning and display it on a Alert screen, this in the phone.

  • [Request For Help] How To Send Email Midlet Using Secure Socket ?

    Hello, this is the first time i ask for help to forum.sun.com.
    i try to make secure connection for send email from MIDlet. Maybe you can check to my code :
    EmailMidlet.java
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import javax.microedition.lcdui.;
    public class EmailMidlet extends MIDlet implements CommandListener{
    Display display = null;
    // email form fields
    TextField toField = null;
    TextField subjectField = null;
    TextField msgField = null;
    Form form;
    static final Command sendCommand = new Command("send", Command.OK, 2);
    static final Command clearCommand = new Command("clear", Command.STOP, 3);
    String to;
    String subject;
    String msg;
    public EmailMidlet() {
    display = Display.getDisplay(this);
    form = new Form("Compose Message");
    toField = new TextField("To:", "", 50, TextField.EMAILADDR);
    subjectField = new TextField("Subject:", "", 15, TextField.ANY);
    msgField = new TextField("MsgBody:", "", 90, TextField.ANY);
    public void startApp() throws MIDletStateChangeException {
    form.append(toField);
    form.append(subjectField);
    form.append(msgField);
    form.addCommand(clearCommand);
    form.addCommand(sendCommand);
    form.setCommandListener(this);
    display.setCurrent(form);
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
    notifyDestroyed();
    public void commandAction(Command c, Displayable d) {
    String label = c.getLabel();
    if(label.equals("clear")) {
    destroyApp(true);
    } else if (label.equals("send")) {
    to = toField.getString();
    subject = subjectField.getString();
    msg = msgField.getString();
    EmailClient client = new EmailClient(this,"[email protected]", to, subject, msg);
    client.start();
    }and EmailClient.java
    import javax.microedition.io.;
    import javax.microedition.lcdui.;
    import java.io.;
    import java.util.Date;
    public class EmailClient implements Runnable {
    private EmailMidlet parent;
    private Display display;
    private Form f;
    private StringItem si;
    private SecureConnection sc; //SSL
    private InputStream is;
    private OutputStream os;
    private String smtpServerAddress = "smtp.gmail.com"; //SSL
    String from;
    String to;
    String subject;
    String msg;
    public EmailClient(EmailMidlet m, String from, String to, String subject, String msg) {
    parent = m;
    this.from = from;
    this.to = to;
    this.subject = subject;
    this.msg = msg;
    display = Display.getDisplay(parent);
    f = new Form("Email Client");
    si = new StringItem("Response:" , " ");
    f.append(si);
    display.setCurrent(f);
    public void start() {
    Thread t = new Thread(this);
    t.start();
    public void run() {
    try {
    //SSL
    sc = (SecureConnection)
    Connector.open("ssl://"smtpServerAddress":465"); //smtp with SSL port 465
    sc.setSocketOption(SocketConnection.LINGER, 5);
    is = sc.openInputStream();
    os = sc.openOutputStream();
    os.write(("HELO there" "\r\n").getBytes());
    os.write(("EHLO" "\r\n").getBytes());
    os.write(("auth login" "\r\n").getBytes());
    os.write(("dHVnYXNha2hpci50cmlhZGl0eWFAZ21haWwuY29t" "\r\n").getBytes());
    os.write(("dGEuZW1haWxjbGllbnQ=" "\r\n").getBytes());
    os.write(("MAIL FROM:<">\r\n").getBytes());
    os.write(("RCPT TO:<">\r\n").getBytes());
    os.write("DATA\r\n".getBytes());
    // stamp the msg with date
    os.write(("Date: " new Date() "\r\n").getBytes());
    os.write(("From: "+from"\r\n").getBytes());
    os.write(("To: "to"\r\n").getBytes());
    os.write(("Subject: "subject"\r\n").getBytes());
    os.write((msg+"\r\n").getBytes()); // message body
    os.write(".\r\n".getBytes());
    os.write("QUIT\r\n".getBytes());
    StringBuffer sb = new StringBuffer();
    int ch = 0;
    while((ch = is.read()) != -1) {
    sb.append((char) ch);
    si.setText("SMTP server response - " + sb.toString());
    } catch(IOException e) {
    e.printStackTrace();
    Alert a = new Alert
    ("TimeClient", "Cannot connect to SMTP server. Ping the server to make sure it is running...", null, AlertType.ERROR);
    a.setTimeout(Alert.FOREVER);
    display.setCurrent(a);
    } finally {
    try {
    if(is != null) {
    is.close();
    if(os != null) {
    os.close();
    if(sc != null) {
    sc.close();
    } catch(IOException e) {
    e.printStackTrace();
    public void commandAction(Command c, Displayable s) {
    if (c == Alert.DISMISS_COMMAND) {
    parent.notifyDestroyed();
    parent.destroyApp(true);
    } When I try to debug project from netbeans, i found this error :
    Starting emulator in debug server mode on port 2668
    Connecting to 127.0.0.1 on port 2800
    nbdebug:
    Waiting for debugger on port 2668
    Waiting for KVM...
    Running with storage root temp.SonyEricsson_JP8_128x160_Emu10
    KdpDebugTask connecting to debugger 1 ..
    Running with locale: Indonesian_Indonesia.1252
    Connected to KVM
    Connection received.
    Attached JPDA debugger to localhost:2668
    java.io.IOException: error 10054 during TCP read +
    at com.sun.midp.io.j2me.socket.Protocol.nonBufferedRead(Protocol.java:299)+
    at com.sun.midp.io.BufferedConnectionAdapter.readBytes(BufferedConnectionAdapter.java:99)+
    at com.sun.midp.io.BaseInputStream.read(ConnectionBaseAdapter.java:582)+
    at com.sun.midp.ssl.Record.rdRec(+41)+
    at com.sun.midp.ssl.Record.rdRec(+5)+
    at com.sun.midp.ssl.In.refill(+18)+
    at com.sun.midp.ssl.In.read(+29)+
    at EmailClient.run(EmailClient.java:74)+
    Execution completed.
    5145824 bytecodes executed
    9258 thread switches
    1762 classes in the system (including system classes)
    0 dynamic objects allocated (0 bytes)
    0 garbage collections (0 bytes collected)
    debug:
    BUILD SUCCESSFUL (total time: 4 minutes 34 seconds)
    Regard
    Littlebro

    Don't multipost and don't use the browser's back button to edit your posts as that creates multiple postings. I've removed the other thread you started with the same questio.
    Also, don't post to long dead threads. I've blocked your post and locked the thread you resurrected.
    db

  • Socket Connection Vs HTTP connection

    I'm trying to get a better understanding of which to use to connect a midlet to a servlet.
    Does anybody know of any advantages socket connections have over http connections i.e performance or anything you can think of? Or is there any reason http connections seem like better practice for this type of communication (servlet-midlet) besides portability across MIDP
    I'll appreciate your opinions

    HTTP is a particular kind of socket connection. If what you're doing is plain old HTTP, then HttpConnection is easier to use. If you need something more than HTTP, then use SocketConnection.

  • Persistent TCP socket trouble

    Hello everybody!
    I'm writing a server/client chat app, mostly for fun but I actually have some use for it as well, when it works that is.
    The server part is pretty much complete, written in Python (since it's so easy and fast to write).
    Anyway, since my chat protocol is supposed to use as little bandwidth as possible, I'm aiming for persistant TCP connections. To make that possible, I've implemented an end of message-marker, so that it reads until it finds the marker, and that's the end of the transmission, instead of reading until the socket is closed and a new connection needs to be reestablished all the time.
    My problem is that I have no idea how to implement this in java! Not in python either to be honest, I used the code from here, although with a few slight modifications:
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/408859
    (the recv_end function)
    For those who don't understand python, it reads 8kB from the socket, checks in the end marker is in there. If not, it checks if the end market got split between multiple packets, and concatenates everything until the original string is restored.
    Now, I need to do this in java (J2ME/MIDP 2.0 to be exact, but if I get some code to work with I'm sure I can make it work).
    I've got this code in my app, that needs to be replaced:
         protected synchronized StringBuffer read ()
              StringBuffer sb = new StringBuffer();
              int i = 0;
              try
                   while (((i = input.read()) != -1))
                        sb.append((char)i);
              catch (Exception e){}
              finally
                   return sb;
         }I'd be glad to post more code or explain more throughly if needed.
    Other ideas might be welcome as well.
    Help would be very appreciated!

    I've solved it, well kinda anyway. :)
    Not the most effective solution, but since I doubt
    that transmissions >1kB will ever be sent/received
    using this program, it doesn't matter that much.
    This is what I did:
         protected StringBuffer read ()
              StringBuffer soFar = new StringBuffer();
    int r = 0;
              while (true)
                   try
                        r = input.read();
                   catch (Exception e)
                        System.out.println(e.toString());
                   if (r != 4)
                        soFar.append((char)r);
                   else
                        return soFar;
    Surely somewhere in that code you will also need
    r++;

  • WTK2.5 beta & S80 DP2.0 MIDP SDK problem

    Hi all,
    I am a newbie into programming for mobile devices and I need a little help in getting a the Network Demo running on the s80 emulator that nokia distribute. I have installed jdk1.5.0_07, wtk2.5 & 2.1, s80 dp2.0 midp sdk. I am able to run the demo using the Sun emulators i.e DefaultColorPhone so i can compile and run the project just fine in wtk2.5. I included the s80 sdk root folder into the wtk2.5/wtklib/devices/ directory and now can build the same project just fine, this is ofcourse after I changed the setting from CLDC1.0 to CLDC1.1 was complaining about floating point errors. I get a warning when trying to run the midlet "WARNING: Attribute value for MicroEdition-Conifugration defined in JAR manifest is not supported." then the midlet chooser selector is launched and so is the emulator. I am able to choose between the server/client radio button but when i click the select button nothing happens?
    I have runs this demo with the standard emulator the midlet is able to connect to a echo server that is running on my server and send it a message. Does anyone have any suggestions in getting this work on the s80 emulator??
    I look forward to your replies

    Update:
    Please note that I am still testing the Network Demo shipped out with the WTK2.5 SDK using a socket connection.
    I have now also added the Nokia Prototype 4.0 SDK to the WTK2.5\wtklib\devices directory and have found that some of the emulators work while others dont. Whats weird is that the s80 _640x200 MIDP emulator mostly works and actually displays that "Start" CBA where as the S80_DP2.0 MIDP emulator only shows the "SELECT" "EXIT" so this was fine to test but when I uploaded the JAR to the real phone it behaved like the S80_DP2.0 MIDP emulator which leads me to believe that there is something wrong with the code.
    Is there anyone that can help me resolve this issue, surely there are developers out there that have come across this problem.

  • SDK 3.2 emulator and socket problem

    Hi, all
    I use syntax
    javax.microedition.io.Connector.open("socket://host:port")
    to create socket connection
    and it works fine until sdk 3.2, in the new emulator i get exception:
    java.io.IOException: IOError in socket::open = 11004\n
    - com.sun.midp.io.j2me.socket.Protocol.open0(), bci=0
    - com.sun.midp.io.j2me.socket.Protocol.connect(), bci=184
    - com.sun.midp.io.j2me.socket.Protocol.open(), bci=216
    - com.sun.midp.io.j2me.socket.Protocol.openPrim(), bci=4
    - javax.microedition.io.Connector.open(), bci=47
    - javax.microedition.io.Connector.open(), bci=3
    - javax.microedition.io.Connector.open(), bci=2
    i think it can be problem in
    ..\javame-sdk\3.2\work\JavaMEPhone1\device.properties
    in line
    runtime.internal.security.domain: maximum
    k it makes maximum security, but i tryed to remove this line and wrote minimum, but nothing helps
    please, help me to fix it )

    Perhaps you should not change the properties file but rather provide the parameter on startup,
    also note:
    minimum. All permissions are denied to MIDlets in this domain.
    maximum. All permissions are granted to MIDlets in this domain. Maximum is the default setting.
    emulator.exe -Xdomain:maximum .....
    also sheck the port you are trying to access; the port number should be higher than 1024.

  • SocketConnection example in MIDP 2.0 javadoc doesn't work

    Good Afternoon every1,
    I am having a problem in establishing a TCP connection, the following code doesn't work:
    try{
                SocketConnection sc = (SocketConnection)Connector.open("socket://localhost:5555");
                sc.setSocketOption(SocketConnection.LINGER, 5);
                System.out.println("Connected\n");
                InputStream is  = sc.openInputStream();
                OutputStream os = sc.openOutputStream();
                os.write("\r\n".getBytes());
                int ch = 0;
                while(ch != -1) {
                    ch = is.read();
                is.close();
                os.close();
                sc.close();
            } catch (Exception ex) {
                ex.printStackTrace();
    and the stack trace of the exception is as follows:
    javax.microedition.io.ConnectionNotFoundException: TCP open
    at com.sun.midp.io.j2me.socket.Protocol.connect(Protocol.java:216)
    at com.sun.midp.io.ConnectionBaseAdapter.openPrim(ConnectionBaseAdapter.java:100)
    at com.sun.midp.io.j2me.socket.Protocol.openPrim(+108)
    at javax.microedition.io.Connector.openPrim(Connector.java:302)
    at javax.microedition.io.Connector.open(Connector.java:211)
    at javax.microedition.io.Connector.open(Connector.java:187)
    at javax.microedition.io.Connector.open(Connector.java:169)
    at hello.HelloMidlet.<init>(HelloMidlet.java:25)
    at java.lang.Class.runCustomCode(+0)
    at com.sun.midp.midlet.MIDletState.createMIDlet(+19)
    at com.sun.midp.midlet.Selector.run(Selector.java:151)
    So It crashes before establishing the connection, I tried more than other connection type: StreamConnection, HttpConnection...but it was useless as the same exception happens...Can any1 help me in resolving this issue plzz ??
    Thanks a lot...

    The 2.0 map now claims I'm 6-7 miles SW of where I really am. I'm glad I'm not alone with the map bug, but I don't have the other problems you are describing.

Maybe you are looking for