bonsoir ,
j'ai un problème avec le code suivant:
le code se compile correctement mais lors de l'éxécution ,lorsque je veux éxécuter le programme sur le telephone virtuel ,le message d'erreur suivant
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class test extends MIDlet { private Display display; private TextBox textbox; public void Hello() { display = Display.getDisplay(this); textbox = new TextBox("", "Bonjour", 20, 0); } public void startApp() { display.setCurrent(textbox); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } }
apparait :
Running with storage root C:\Documents and Settings\guy's\j2mewtk\2.5.2\appdb\DefaultColorPhone
Running with locale: French_France.1252
Running in the identified_third_party security domain
startApp threw an Exception
java.lang.NullPointerException
java.lang.NullPointerException
at test.startApp(+8)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+270)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
Execution completed.
3415687 bytecodes executed
446 thread switches
1668 classes in the system (including system classes)
17776 dynamic objects allocated (534732 bytes)
2 garbage collections (461532 bytes collected)
merci beaucoup ^^
Partager