1

I have my J2me application that have 880KB size. I have to run this jar file in multiple phones. Some phones have shown the exceptions given below while clicking jar file.

These are

  1. Java Error. Content Size too Large.
  2. item not supported.

As far as I know, java memory and phone memory are different things. So, we must have sufficient java memory space to run my application.

  1. So, please tell me the reason to this problem and also let me know if there is any way to find Available memory space for JAVA.
  2. How to find if the phone is java enabled or not?
  3. I would like to know whether 880 Kb jar file is normal size or not?
Vimal
  • 1,266
  • 1
  • 9
  • 16
Saravanan
  • 11,372
  • 43
  • 143
  • 213

2 Answers2

1

Normally S40 mobiles are allowing limited size of JAR file on the mobiles. That mobiles allowing only 166KB to 2 MB. Also that mobiles having limited heap memory (Max 4 MB, Based on S40 version). If JAR file size exceed, you will get the error warning like Java Error. Content Size too Large.

If you want to find java enabled mobiles list, you have to find manually(For nokia see this specification).

There is one alternate way to find mobile information's. That is use WURFL. You can get the mobile information's on server side when user download the JAR file from WAP browser.

bharath
  • 14,283
  • 16
  • 57
  • 95
1

Work on this checklist:

  1. The first error message,
    • As @bharath rightly pointed out 'Java Error. Content Size too Large.' is due to your jar size exceeding the device jar size limit and the reference link.
    • Some useful link for Samsung devices on this topic
  2. The second error message, probably you meant "item not supported cannot be downloaded", is due to incorrect MIME types for .jar and .jad files in the webserver
  3. add these into your webserver's config: 
    
    AddType text/vnd.sun.j2me.app-descriptor jad 
    AddType application/java-archive jar 
    Hopefully that should cover mobile phone related binary package out there
    
  4. Reduce jar size
  • At this link somewhere in the response posts you can read
    • I recommend limiting the size to 300k (for 2G networks) or 1Mb (for 3G networks), but these are not strict limits., and
    • WAPGateways put a limit of as low as 300k jarsize for OTA downloads thu them

    Community
    • 1
    • 1
    Vimal
    • 1,266
    • 1
    • 9
    • 16