Plz see Mr.Prabhu i tried it but error

Hi Mr.Prabhu,

I tried it and I think the logic is fine but i get this error!

plz help!

the error states:

Warning: To avoid potential deadlock, operations that may block, such as

networking, should be performed in a different thread than the

commandAction() handler.

[318 byte] By [Joel.Karimpil] at [2007-9-30 20:41:20]
# 1

Hi,

This is not an error but a simple warning bcoz you are trying to establish a connection which will casuse the app not to respond to events. You have to establish connection in a seperate thread.

Please visit the following link about threads in J2ME.

http://developers.sun.com/techtopics/mobility/midp/articles/threading2/

here is the pseudo code.

public void commandAction(...) {

new MyConnection();

}

class MyConnection extends Thread {

MyConnection() {

start();

}

public void run() {

//login to connect to server

}

}

prabhu_cbe at 2007-7-7 1:30:22 > top of Java-index,Java Mobility Forums,Java ME Technologies...