Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Nokia Emulator shuts itself down

 
Philip Pomario
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, I hate to post code to help solving problems. Though, this is very short and the only way to get some help. The deal is: the Nokia emulator opened through Eclipse shuts itself down when I Select to open MyMIDlet. I found some coded at forum.nokia.com and they work fine, so my dev environment isn't the issue here.

Anyone knows what's going on?

Regards,
Filipe


- - - - - - - - - - - - -
MyMIDlet.jad
- - - - - - - - - - - - -
MIDlet-Name: MyMIDlet
MIDlet-Version: 1.0.2
MIDlet-Vendor: FakeCompany
MIDlet-Jar-URL: MyMIDlet.jar
MIDlet-Jar-Size: 1494
MIDlet-1: MyFirstMIDlet, , myPackage.MyFirstMIDlet
MIDlet-1: MyFirstTextBox, , myPackage.MyFirstTextBox


- - - - - - - - - - - - -
MyFirstTextBox.java
- - - - - - - - - - - - -
package myPackage;

import javax.microedition.lcdui.TextBox;
import javax.microedition.lcdui.TextField;

class MyFirstTextBox extends TextBox {
MyFirstTextBox(){
super("TextBoxName",null,5, TextField.NUMERIC );
}
}


- - - - - - - - - - - - -
MyFirstMIDlet.java
- - - - - - - - - - - - -
package myPackage;

import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class MyFirstMIDlet extends MIDlet {

public MyFirstMIDlet() { }

protected void startApp() throws MIDletStateChangeException {
Displayable current = Display.getDisplay(this).getCurrent();
if (current == null) {
MyFirstTextBox textBox = new MyFirstTextBox();
Display.getDisplay(this).setCurrent(textBox);
}
}

protected void pauseApp() { }

protected void destroyApp(boolean arg0) { }

}
 
Nerella Kishore
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Seems to be given the wrong MIDlet name in your jad file. I hope MIDlet Name should be the same as Midlet.java file.
In your case MIDlet name (should be): MyFirstMIDlet

Try it out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic