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.
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
}
}