Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User SerDai's Avatar
    Join Date
    Apr 2008
    Posts
    6
    I have a small J2ME game that I want to compile with NetBeans.
    I installed "Series 40 SDK 3rd Edition Feature Pack 2" and used it as a platform.

    The project compiles, but when I try to run it on the emulator included with the SDK it sais "Invalid Application".

    What extra info do you need?

  2. #2
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    My first guess

    Check from the JAD file (or from the manifest inside the JAR) that the MIDlet is built for MIDP2.0, not MIDP 2.1...

    Hartti

  3. #3
    Registered User SerDai's Avatar
    Join Date
    Apr 2008
    Posts
    6
    NetBeans sais it compiles for MIDP 2.0 and CLDC 1.1
    It should work on the emulator, because it's compiled with the same platform it came with...
    http://img90.imageshack.us/img90/9229/settingswk5.png

  4. #4
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    Scratch that then...

    What APIs are you using in the app? could you list the imported packages?

    In Eclipse there was sometimes problems with Java compliancy setting (which shoudl be 1.4 or lower). Cannot remember if I ever see this as a problem on NetBeans though

    Hartti

  5. #5
    Registered User SerDai's Avatar
    Join Date
    Apr 2008
    Posts
    6
    Apparently it can run on Nokia_S40_DP20_SDK_1_1 (although there's an error message), but not on "Series 40 SDK 3rd Edition Feature Pack 2"

    http://i30.tinypic.com/2hnwd1g.png

  6. #6
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    Can you throw in here the jad or manifest file contents?

    do you have the "MIDlet-<n>" attribute (at least MIDlet-1) defined in there?

    Hmm... started thinking that I hope you have a MIDlet class in your JAR to start with...

    Hartti

  7. #7
    Registered User SerDai's Avatar
    Join Date
    Apr 2008
    Posts
    6
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 1.6.0_03-b05 (Sun Microsystems Inc.)
    MIDlet-Vendor: Vendor
    MIDlet-Name: PONG
    MIDlet-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MicroEdition-Profile: MIDP-2.1

    there is, however, no MIDlet.class file, just the .class files corresponding to the project.

  8. #8
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    Hmm.. there is no MIDlet-1 class defined in the manifest file. How can the system know which class to create in order to execute the MIDlet?

    Do you have any class in the JAR file which is based on MIDlet class (there needs to be at least one in the Java ME JAR...)?
    (It looks that you do not have that class in the JAR as NetBeans usually creates the correct JAD and manifest if you have one...)

    Note that the Java ME application lifecycle is different from the Java SDK application life cycle... (sorry if I am pointing out the obvious...)

    Hartti

  9. #9
    Registered User SerDai's Avatar
    Join Date
    Apr 2008
    Posts
    6
    I'm not into J2ME so I don't know the details.
    In Eclipse with Polish I would just add the code and it works.

    Any NetBeans hints?

  10. #10
    Registered User apus29's Avatar
    Join Date
    Mar 2008
    Posts
    116
    I don't understand why you use other sdk when you use netbeans 6.0(may be i am wrong..not sure)...
    if you specify the API's used for the code then it will be easy to find out the problem.

    just try to run the code on netbeans.
    There should be a midlet class. midlet class doesn't mean midlet.class...
    Try to find out the class which extend Midlet class....

    Regards
    Opu

  11. #11
    Registered User SerDai's Avatar
    Join Date
    Apr 2008
    Posts
    6
    I do have a class that extends midlet

    "public class iPong extends MIDlet "

  12. #12
    Registered User apus29's Avatar
    Join Date
    Mar 2008
    Posts
    116
    Quote Originally Posted by SerDai View Post
    I do have a class that extends midlet

    "public class iPong extends MIDlet "
    Try to run that midlet. you havn't mentioned the API's name yet.

    anyway i think it should work.

    Regards
    Opu

  13. #13
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Hi,

    check for the MIDP Version you have selected.It must not be MIDP2.1.If yes then select MIDP2.0.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  14. #14
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    The manifest file needs to have the MIDlet-1 attribute in there. In the one you posted above, there is none. The IDE should place it there automatically. If not, you could try to add it manually (there should be some menu options for this in Netbeans too)

    The format is
    MIDlet-1: <MIDlet name>, <MIDlet icon>, <MIDlet class>

    Hartti

Similar Threads

  1. Invalid Application error
    By gx in forum Mobile Java General
    Replies: 2
    Last Post: 2007-06-05, 10:30
  2. Launching a view of a diffrent application
    By nsivach in forum Symbian C++
    Replies: 3
    Last Post: 2007-03-22, 09:51
  3. Application without icon in application menu
    By iulian_moldovan in forum Symbian C++
    Replies: 3
    Last Post: 2006-12-14, 09:38
  4. invalid application
    By IronWolf in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2006-12-04, 18:10
  5. Replies: 0
    Last Post: 2005-05-28, 10:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved