Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/08/2010, 08:40
Avatar de RIVERMILLOS
RIVERMILLOS
 
Fecha de Ingreso: marzo-2010
Mensajes: 1.336
Antigüedad: 14 años, 2 meses
Puntos: 15
ayuda con jar de J2me

hola tengo este hola mundo de j2me , pero cuando genero el jar y lo paso a un celular me dice que hay un error que puede ser? estoy utilizando eclipse.

Código:
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.TextBox;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;


public class holamundo extends MIDlet implements CommandListener {

	private Display pantalla;
	private TextBox saludos;
	private Command aceptarCmd;
	
	
	public holamundo(){
		
	saludos= new TextBox("saludo", "hola mundo", 256, 0);
	aceptarCmd= new Command("Aceptar", Command.SCREEN, 1);
		
	}
	
	public void commandAction(Command c, Displayable d) {
		if(c == aceptarCmd){
		try {
			destroyApp(true);
		} catch (MIDletStateChangeException e) {
			
			e.printStackTrace();
		}
		notifyDestroyed();
		}

	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub

	}

	protected void pauseApp() {
		pantalla=null;

	}

	protected void startApp() throws MIDletStateChangeException {
		pantalla=Display.getDisplay(this);
		saludos.addCommand(aceptarCmd);
		saludos.setCommandListener((CommandListener)this);
		pantalla.setCurrent(saludos);

	}

}
saludos