import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.midlet.MIDletStateChangeException;
public class J2MEHelloWorld extends MIDlet implements CommandListener{
// Fields
private Command exitCommand;
private Form form;
private Display display;
// Constructor
public J2MEHelloWorld(){
// Make the display ready
display = Display.getDisplay(this);
//
form = new Form("Midlet's title");
// Create an Exit command
exitCommand = new Command("Exit", Command.EXIT, 2);
form.addCommand(exitCommand);
form.setCommandListener(this);
// Displays Strings
form.append("Platform: "+System.getProperty("microedition.platform")+"\n");
form.append("Configuration: "+System.getProperty("microedition.configuration")+"\n");
form.append("Profiles: "+System.getProperty("microedition.profiles")+"\n");
form.append("Encoding: "+System.getProperty("microedition.encoding")+"\n");
form.append("Hallo Handy Welt!");
}
// Methods
protected void startApp() throws MIDletStateChangeException{
display.setCurrent(form);
}
protected void pauseApp(){ }
protected void destroyApp(boolean arg0) throws MIDletStateChangeException { }
public void commandAction(Command command, Displayable displayable){
if(command == exitCommand){
try{ destroyApp(false);
}catch (MIDletStateChangeException e){ e.printStackTrace(); }
notifyDestroyed();
}
}
}
Es gibt im jar-Datei nur eine einzige Klasse J2MEHelloWorld.class und das ist so auch richtig.Manifest-Version: 1.0
MIDlet-Vendor: Midlet Suite Vendor
MIDlet-Version: 1.0.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-Name: J2MEHelloWorld Midlet Suite
MicroEdition-Profile: MIDP-2.0
Wann kommt denn die Fehlermeldung?
Wann kommt denn die Fehlermeldung?
Nach dem ich auf dem Handy die jar-Datei anklicke versucht er die Datei zu installieren und nach einer Sekunde zeigt er den Fehler.