| View previous topic :: View next topic |
| Author |
Message |
Kopernik
Joined: 09 Apr 2009 Posts: 4
|
Posted: Thu Apr 09, 2009 2:33 pm Post subject: Invalid application. Delete? - Canot run midlet on emulator |
|
|
I have written simple midlet in NetBeans 6.5:
| Code: |
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
public class HelloWorld extends MIDlet
{
public HelloWorld()
{
// TODO Auto-generated constructor stub
}
protected void destroyApp(boolean arg0)
{
// TODO Auto-generated method stub
}
protected void pauseApp()
{
// TODO Auto-generated method stub
}
protected void startApp() throws MIDletStateChangeException
{
Displayable current = Display.getDisplay(this).getCurrent();
if(current == null)
{
HelloScreen helloScreen = new HelloScreen(this, "Hello World.");
Display.getDisplay(this).setCurrent(helloScreen);
}
}
void exitRequested()
{
destroyApp(false);
notifyDestroyed();
}
}
class HelloScreen extends TextBox implements CommandListener
{
private final HelloWorld midlet;
private final Command exitCommand;
HelloScreen(HelloWorld midlet, String string)
{
super("HelloWorldMIDlet", string, 256, 0);
this.midlet = midlet;
exitCommand = new Command("Exit", Command.EXIT, 1);
addCommand(exitCommand);
setCommandListener(this);
}
public void commandAction(Command c, Displayable d)
{
if(c == exitCommand)
{
midlet.exitRequested();
}
}
}
|
jad of it:
| Quote: |
MIDlet-Jar-Size: 1882
MIDlet-Jar-URL: Simple.jar
MIDlet-Name: Simple
MIDlet-Vendor: Vendor
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
|
But it dosn't run on Nokia 40 Series 5th edition emulator (Invalid application. Delete?) and standart WTK emulator (dosn't start at all).
At the same time if I create this project in Eclipse it runs ok.
What's problem? Please help me!
I want to migrate from Eclipse to NetBeans but this problem dosn't allow to do this...  |
|
| Back to top |
|
 |
Kopernik
Joined: 09 Apr 2009 Posts: 4
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|