ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
402
402
EMPFEHLEN
-
27.12.09 16:46 #1
- Registriert seit
- Oct 2009
- Beiträge
- 123
Hallo,
ich habe aus meinen Java ME Buch ein Programm nach Programmiert und es Läuft im Emulator nicht!
Zu dem Buch gab es auch eine CD mit allen projekten drauf, da habe ich dann als es nicht get hat den Quelltext kopiert und es damit versucht und es klappt auch nicht! Woran kann das liegen? hier mal der komplette Code:
Code java:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.rms.*; public class HalloWelt extends MIDlet implements CommandListener { private Display display; private Command menuExit=new Command ("Verlassen", Command.EXIT,1); private ChoiceGroup cGroup=new ChoiceGroup("Auswahl", ChoiceGroup.EXCLUSIVE); private DateField dField=new DateField("Kalender", DateField.DATE); private Gauge gauge=new Gauge ("Fortschritt", true,10,2); private TextField tField=new TextField("Textfeld","...",30,TextField.ANY), ltField=new TextField("Textfeld","",30,TextField.UNEDITABLE); private Command menuSave=new Command("Save", Command.ITEM,1), menuLoad=new Command("Load",Command.ITEM,1); private Form f=new Form("Hallo Welt Form!"); public HalloWelt() { cGroup.append("Äpfel",null); cGroup.append("Birnen",null); f.append(cGroup); f.append(dField); f.append(gauge); f.append(ltField); f.addCommand(menuSave); f.addCommand(menuLoad); f.addCommand(menuExit); f.setCommandListener(this); } private void saveTextField() { RecordStore store; byte[] data; try { store=RecordStore.openRecordStore("HalloWeltStore", true,RecordStore.AUTHMODE_PRIVATE,true); data=tField.getString().getBytes(); store.setRecord(1,data,0,data.length); store.closeRecordStore(); } catch(RecordStoreException rse) { ltField.setString(rse.toString()); } } private void loadTextField() { RecordStore store; byte[] data; try { store=RecordStore.openRecordStore("HalloWeltStore", false); data=store.getRecord(1); store.closeRecordStore(); ltField.setString(new String(data)); } catch(RecordStoreException rse) { ltField.setString(rse.toString()); } } public void startApp() throws MIDletStateChangeException { display =Display.getDisplay(this); display.setCurrent(f); } public void pauseApp() { } public void destroyApp(boolean unconditional) throws MIDletStateChangeException { } public void commandAction(Command c, Displayable s) { if(c==menuExit) notifyDestroyed(); else if(c==menuSave) saveTextField(); else if(c==menuLoad) loadTextField(); } }
beim Compilieren kommt in der Console immer das hier in rot:
Application descriptor does not declare any MIDlet. Direct execution is not allowed.
Hoffe ihr könnt mir helfen
Danke schon mal im vorraus.
Ähnliche Themen
-
von einem java Programm auf eine .jar datei zugreifen
Von Paddelente im Forum JavaAntworten: 12Letzter Beitrag: 22.04.07, 09:03 -
Exeltabelle aus einem Java Programm erzeugen!
Von tikemyson im Forum JavaAntworten: 10Letzter Beitrag: 21.09.06, 10:48 -
Öffnen einer Internetseite aus einem Java-Programm
Von jorgeHX im Forum JavaAntworten: 2Letzter Beitrag: 25.08.06, 21:47 -
Wie installiere ich ein Java-Programm auf einem Motorola Handy
Von Kaiser206 im Forum Handy, PDA & mobile WeltAntworten: 5Letzter Beitrag: 04.01.06, 18:13 -
CSS Menü aus einem Buch geht nicht
Von kaipron im Forum CSSAntworten: 3Letzter Beitrag: 23.03.05, 16:09





Zitieren
Login





