Results 1 to 3 of 3
- 02-21-2009, 05:51 PM #1
Member
- Join Date
- Feb 2009
- Posts
- 2
- Rep Power
- 0
JAVA ME - Problems compiling and running in Eclipse
Hello,
I am new to Java ME and I am trying to run a copied HelloMIDlet application. I am getting following error when I am trying to run the application:
And the applicaiton:Java Code:Running with storage root C:\Users\Niklas\j2mewtk\2.5.2\appdb\MediaControlSkin Running with locale: Swedish_Sweden.1252 Running in the identified_third_party security domain java.lang.NullPointerException at javax.microedition.lcdui.Item.addCommandImpl(+11) at javax.microedition.lcdui.StringItem.addCommandImpl(+11) at javax.microedition.lcdui.Item.addCommand(+11) at HelloMIDlet.<init>(+99) at java.lang.Class.runCustomCode(+0) at com.sun.midp.midlet.MIDletState.createMIDlet(+34) at com.sun.midp.midlet.Scheduler.schedule(+52) at com.sun.midp.main.Main.runLocalClass(+28) at com.sun.midp.main.Main.main(+80) Execution completed. 3415817 bytecodes executed 17 thread switches 1667 classes in the system (including system classes) 17760 dynamic objects allocated (533540 bytes) 2 garbage collections (459436 bytes collected)
I did try to remove as much code as possible still being able to compile it. Exactly the same type of error was presented still...Java Code:import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class HelloMIDlet extends MIDlet implements CommandListener { // The exit command private Command exitCommand; // The display for this MIDlet private Display display; // create a ticker private Ticker hi = new Ticker("J2ME is cool"); public HelloMIDlet() { display = Display.getDisplay(this); exitCommand = new Command("Exit", Command.SCREEN, 2); } public void startApp() { TextBox t = new TextBox("Hello MIDlet", "Wireless Internet", 256, 0); t.addCommand(exitCommand); t.setCommandListener(this); t.setTicker(hi); // set the ticker display.setCurrent(t); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } public void commandAction(Command c, Displayable s) { if (c == exitCommand) { destroyApp(false); notifyDestroyed(); } } }
I have another MIDlet in the same projects that works fine.
What is the problem?
Thank you in advance!
Best Regards,
Niklas
- 03-20-2009, 09:43 AM #2
Member
- Join Date
- Mar 2009
- Posts
- 1
- Rep Power
- 0
hi,
I'm using YICES with eclipse it's a theory prouver, when i'm runing the project there is error in runing it's "lunch failed no file binary", please help me :(
- 03-20-2009, 10:58 AM #3
Member
- Join Date
- Feb 2009
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Equinox problems running on Eclipse 3.4
By jguerra in forum EclipseReplies: 0Last Post: 09-05-2008, 02:34 PM -
Running eclipse java project on command prompt
By hnmapara in forum New To JavaReplies: 1Last Post: 07-09-2008, 08:29 AM -
Compiling and running code in runtime
By tim in forum New To JavaReplies: 4Last Post: 01-27-2008, 06:58 PM -
Importing / compiling and running with .jar package
By splinter64uk in forum New To JavaReplies: 1Last Post: 12-05-2007, 02:47 AM -
problems when compiling
By valery in forum New To JavaReplies: 2Last Post: 07-25-2007, 07:35 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks