Hi ....

I write a midlet by notepad and it test and work fine on WTK 2.2 .

But when I install it to Nokia 7610,after making a connection , it disappear a error (only "!") information

how should I make my midlet to work fine on Nokia 7610 ???
plz help !!!!!!!

this my code
Code:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.rms.*;
import javax.microedition.io.*;
import java.io.*;

public class DXMIDPMIDlet extends MIDlet
		         implements CommandListener{

  private List menuList;
  private List luckyList;
  private List commList;

  private Command exitCommand;
  private Command execCommand;
  private Command exec1Command;
  private Command menuCommand;
  private Command commCommand;
  private Command luckyCommand;
  private Command saveCommand;

  String[] menuItem ={"queue","redirect"};
  String[] commItem ={"queue"};
  String[] luckyItem ={"1","2","3",
   	                   "4","5","6",
   	                   "7","8","9",
   	                   "10","11","12"
 	                  };

  private Display display;
  private String currentScreen = "";
  public static String  criteria = "";
  private int deleteID = 0;
  private int modificationID = 0;

  private String newsURL = "http://xxx.xx.xxx.xxx:314//dxmidp.asp";
  private String starsURL = "http://xxx.xx.xxx.xxx:314//lucky.asp";

  public DXMIDPMIDlet() {
    display = Display.getDisplay(this);

    exitCommand = new Command("exit", Command.EXIT, 1);
    execCommand = new Command("run",Command.OK, 1);
    exec1Command = new Command("run",Command.OK, 1);
    menuCommand = new Command("main menu",Command.SCREEN, 1);
    commCommand = new Command("queue",Command.SCREEN, 1);
    luckyCommand = new Command("redirect",Command.SCREEN,1);

  }

  public void startApp() {
    menuList = new List(null,List.IMPLICIT,menuItem,null);
	menuList.addCommand(exitCommand);
	menuList.setCommandListener(this);
	display.setCurrent(menuList);
	currentScreen="main menu";
  }

  public void pauseApp() { }
  public void destroyApp(boolean unconditional) { }
  


  public void commandAction(Command c, Displayable s) {
    if (c == exitCommand) {
        destroyApp(false);
        notifyDestroyed();
    }

    if(c==List.SELECT_COMMAND){
		if(currentScreen=="main menu"){
		   int itemIndex = menuList.getSelectedIndex();
		   switch(itemIndex){
		   	   case 0: {
			    	 doCommunication();
				     break;
				 }
			  case 1: {
			  	doLucky();
			  	break;
		   }
		  }
	    }
	}

	if(c==menuCommand){
		display.setCurrent(menuList);
        currentScreen="main menu";
	}

	if(c==commCommand){
		doCommunication();

	}

	if(c==luckyCommand){
		doLucky();
	}

    if(c==menuCommand){
        doMenu();
	}
  
  if(c==exec1Command){
  if(currentScreen=="queue"){
	  Thread t = new Thread() {
      public void run() {
      showComm();
       }
      };
      t.start();
    }		
		}
	
	
	if(c==execCommand){
		if(currentScreen=="redirect"){
	   Thread t = new Thread() {
       public void run() {
        showLucky();
        }
      };
      t.start();
    }					
		}

}


 private void doMenu(){
     currentScreen="main menu";
     display.setCurrent(menuList);
 }

 private void doCommunication(){

	 commList = new List("queue",List.EXCLUSIVE,commItem,null);

     commList.addCommand(luckyCommand);

     commList.addCommand(menuCommand);
     commList.addCommand(exec1Command);
     commList.setCommandListener(this);
     currentScreen="queue";
     display.setCurrent(commList);
 }

  private void doLucky(){
 	 luckyList = new List("redirect",List.EXCLUSIVE,luckyItem,null);

     luckyList.addCommand(commCommand);

     luckyList.addCommand(menuCommand);
     luckyList.addCommand(execCommand);
     luckyList.setCommandListener(this);
     currentScreen="redirect";
     display.setCurrent(luckyList);
 }

  private void showComm(){
	 int selectedItem = commList.getSelectedIndex();
	 Alert alert;
	 String information = "";

	 switch(selectedItem){
		 case 0:{
			 information = "";
			 break;
		 }
	 }

	 String result="";
	 try{
	 	 result = requestUsingGET(newsURL,information);
	 }
	 catch(IOException e){
	 	 result = "fail!";
	 }

	 alert = new Alert("queue",result,null,AlertType.INFO);
	 alert.setTimeout(Alert.FOREVER);
	 display.setCurrent(alert);
 }
 
 
 
 private void showLucky(){
	 int selectedItem = luckyList.getSelectedIndex();
	 Alert alert;
	 String text = "";

	 switch(selectedItem){
		 case 0:{
			 text = "text=1";
			 break;
		 }
		 case 1:{
			 text = "text=2";
			 break;
		 }
		 case 2:{
			 text = "text=3";
			 break;
		 }
		 case 3:{
			 text = "text=4";
			 break;
		 }
		 case 4:{
			 text = "text=5";
			 break;
		 }
		 case 5:{
			 text = "text=6";
			 break;
		 }
		 case 6:{
			 text = "text=7";
			 break;
		 }
		 case 7:{
			 text = "text=8";
			 break;
		 }
		 case 8:{
			 text = "text=9";
			 break;
		 }
		 case 9:{
			 text = "text=10";
			 break;
		 }
		 case 10:{
			 text = "text=11";
			 break;
		 }
		 case 11:{
			 text = "text=12";
			 break;
		 }
	 }

	 String result="";
	 try{
	 	 result = requestUsingGET(starsURL,text);
	 }
	 catch(IOException e){
	 	 result = "connection fail!";
	 }

	 alert = new Alert("redirect",result,null,AlertType.INFO);
	 alert.setTimeout(Alert.FOREVER);
	 display.setCurrent(alert);
 }

 
   public boolean existing(String recordStoreName) {
     boolean existingOrNot = false;
     RecordStore rs = null;
     if(recordStoreName.length() > 32) return false;
     try{
 	    rs = RecordStore.openRecordStore(recordStoreName,false);
     }
     catch(RecordStoreNotFoundException e){
 	    existingOrNot = false;
     }
     catch(Exception e){
     }
     finally{
     	try{
 	        rs.closeRecordStore();
 	    }
 	    catch(Exception e){
 	    }
     }
    return existingOrNot;
  }

    private String requestUsingGET(String URL,String URLString) throws IOException{
  	  HttpConnection hpc = null;
  	  DataInputStream dis = null;
  	  DataOutputStream dos = null;
  	  InputStreamReader xdis = null;

      boolean newline = false;
  	  String content = "";

  	  try{
  		  hpc = (HttpConnection)Connector.open(URL);
  		  hpc.setRequestMethod(HttpConnection.POST);
  		  hpc.setRequestProperty("User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0");
  		  hpc.setRequestProperty("Content-Language","zh-tw");
  		  hpc.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
  		  hpc.setRequestProperty("Content-Length",String.valueOf(URLString.length()));

  		  dos = new DataOutputStream(hpc.openOutputStream());
  		  dos.write(URLString.getBytes());
  		  dos.flush();

   		  xdis = new InputStreamReader(hpc.openInputStream());
          int character;
  		  while((character = xdis.read()) != -1 ){
  			  if((char)character =='\\'){
  				newline = true;
  			    continue;
  			  }
  			  else {
  				    if((char)character =='n' && newline){
  			           content += "\n";
  			           newline = false;
  		             }
  		             else if(newline){
  		                content += "\\" +(char)character ;
  		                newline = false;
  					}
     			    else {
  			            content += (char)character;
  			            newline = false;
  				    }
  			  }
   		  }
  	  }
  	  catch(IOException e){
  		  System.out.println("error:"+e);
  	  }

  	  try{
  		  if(hpc != null)
  		     hpc.close();
  		  if(xdis != null)
  		     xdis.close();
  	  }
  	  catch(IOException e2){
  	  }

  	  return content;
  }
}