Hallo,
ich hab aus meinem Java ME Buch ein kleines Prog ab programmiert, aber es funzt nicht einfach nich
hier mal der fehler:
\NetBeansProjects\HalloWelt\nbproject\build-impl.xml:898: Execution failed with error code 1.
ERSTELLEN FEHLGESCHLAGEN (Gesamtzeit: 0 Minuten 22 Sekunden)
(Ich benutz Netbeans)
und das ist der Quellcode:
ich hab aus meinem Java ME Buch ein kleines Prog ab programmiert, aber es funzt nicht einfach nich
hier mal der fehler:
\NetBeansProjects\HalloWelt\nbproject\build-impl.xml:898: Execution failed with error code 1.
ERSTELLEN FEHLGESCHLAGEN (Gesamtzeit: 0 Minuten 22 Sekunden)
(Ich benutz Netbeans)
und das ist der Quellcode:
Java:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HalloWelt extends MIDlet implements CommandListener
{
Display display;
private Command
menu1 = new Command("Hallo", Command.ITEM, 1),
menu2 = new Command("Welt", Command.ITEM, 1),
menu3 = new Command("!", Command.ITEM, 1),
menu4 = new Command("Umbruch", Command.ITEM, 1),
menuExit = new Command("Verlassen", Command.ITEM, 1);
private Form f = new Form("Hallo Welt Form");
public HalloWelt()
{
f.append("Hallo Welt!\n");
f.addCommand(menu1);
f.addCommand(menu2);
f.addCommand(menu3);
f.addCommand(menu4);
f.addCommand(menuExit);
f.setCommandListener(this);
}
public void startApp() throws MIDletStateChangeException
{
display = Display.getDisplay(this);
display.setCurrent(f);
}
public void pauseApp()
{
}
public void destroyApp(boolean unconditional)
{
}
public void commandAction(Command c, Displayable s)
{
if(c == menuExit)
notifyDestroyed();
else if(c == menu1)
f.append("Hallo ");
else if(c == menu2)
f.append("Welt");
else if(c == menu3)
f.append("!");
else if(c == menu4)
f.append("\n");
}
}