• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Nokia Emulator shuts itself down

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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) { }

}
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic