×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    1

    Invalid jar file

    Hi

    I can download, install and run jar files on an old Nokia mobile based on midp-1.0

    If I do the same without any modifactions on the source code or jar file with a midp-2.0 based Nokia mobile, I always get the error message 'Invalid jar file'. I tried it with the N70 and N80 mobile, the download goes always through bluetooth.

    1) Does anybody know this issue and can help me to resolve it?

    2) Where can I find further error or log messages on the phone in order to get more information.

    --
    Any help is very much appreciated.

    Thanks,
    Sam

  2. #2
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    68

    Re: Invalid jar file

    yeah
    i've exactly the same problem. as well, i changed the settings in device management to use CLDC v1.0 library instead of CLDC v1.1 as for when i changed the same about MIDP v2.1 (into MIDP v2.0) some error got solved.
    i use N80 and WTK v2.5.2.

  3. #3
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Invalid jar file

    Also check whether your IDE is compiling classes in 1.4 format. Eclipse 3.2 by default compiles with 1.5 format, which is incompatible with mobile devices.

    Daniel

  4. #4
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    Re: Invalid jar file

    Check that the JAD and MF match. Perhaps some phones are less picky.

  5. #5
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    68

    Re: Invalid jar file

    i checked the version, it was 5.0, i tried 1.4 and 1.3, but there was no difference. here're my files after deployment:

    t003.jad:
    MIDlet-Jar-Size: 887
    MIDlet-Jar-URL: t003.jar
    MIDlet-Name: t003 Midlet Suite
    MIDlet-Vendor: Midlet Suite Vendor
    MIDlet-Version: 1.0.0
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-2.0

    MANIFEST.MF:
    Manifest-Version: 1.0
    MicroEdition-Configuration: CLDC-1.0
    MIDlet-Name: t003 Midlet Suite
    MIDlet-Vendor: Midlet Suite Vendor
    MIDlet-Version: 1.0.0
    MicroEdition-Profile: MIDP-2.0

    the way i try to run my application is to use J2ME/Create Package in the context menu of the project. then try to install the .JAR file located in the deployed folder by PC Suite. during installation the error "Invalid Jar File" appears in N80 mobile.
    i don't know what to do. please help me in solving the problem and know why is it.
    thx

  6. #6
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    Re: Invalid jar file

    You're missing MIDlet-1 which specifies, among other things, the class to load.

    And although I don't think it matters, try putting the fields in the same order. MicroEdition-Configuration is misplaced in the MF.

  7. #7
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    68

    Re: Invalid jar file

    yeah that's it! thanx
    but why eclipse does not include this line?

  8. #8
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    Re: Invalid jar file

    I assume you have to define the individual MIDlets somewhere, in addition to the package (you can have multiple MIDlets in a JAR). But I don't use Eclipse, so it's a guess.

  9. #9
    Registered User
    Join Date
    Nov 2007
    Posts
    1

    Re: Invalid jar file

    Hi

    I've just had the same problem when using Eclipse. The cause of it was that I created the source file using New->Class rather than New->J2ME Midlet. Once I did this, the deployed JAD file included MIDlet-1 and the app installed first time.

    Regards

    Ian

Similar Threads

  1. Can't include png file into jar file when create MIDlet suite
    By hi_sailom in forum Mobile Java Tools & SDKs
    Replies: 7
    Last Post: 2008-08-01, 04:07
  2. "Authorization failed" message displayed when installing jar file
    By capricious28 in forum Mobile Java General
    Replies: 8
    Last Post: 2008-04-03, 20:34
  3. Invalid file error
    By arso in forum Mobile Java General
    Replies: 1
    Last Post: 2006-01-19, 11:21
  4. OTA: invalid file
    By ATsessarsky in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2005-09-07, 09:43
  5. reading text file from a jar file -> file not found!
    By iecomdev in forum Mobile Java General
    Replies: 1
    Last Post: 2002-09-30, 12:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •