NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Invalid application. Delete? - Canot run midlet on emulator

 
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users
View previous topic :: View next topic  
Author Message
Kopernik



Joined: 09 Apr 2009
Posts: 4

PostPosted: Thu Apr 09, 2009 2:33 pm    Post subject: Invalid application. Delete? - Canot run midlet on emulator Reply with quote

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... Sad
Back to top
Kopernik



Joined: 09 Apr 2009
Posts: 4

PostPosted: Fri Apr 10, 2009 5:38 pm    Post subject: I've solved problem Reply with quote

Right-click on project->Properties->Application Descriptor->MIDlets->Add.

This command adds to jad first string "MIDlet-1: HelloWorld,,HelloWorld".

Similar problem is described here http://tecknolojia.blogspot.com/2008/03/invalidjadexception-in-netbeans.html
Back to top
praveenke



Joined: 11 Sep 2014
Posts: 1

PostPosted: Thu Sep 11, 2014 2:05 am    Post subject: Invalid Application Delete? J2ME Reply with quote

This should be also because of the MIDlet class is not specified.

You can refer it here

http://mytechties.blogspot.in/2014/09/invalid-application-delete-j2me.html
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users All times are GMT
Page 1 of 1

 
Jump to:  
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 cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo