×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    80

    Big jar file in Nokia J2me simulator

    Hi,
    Encountering 2 problems, can anybody give me tips?

    A. I have many images and jar file is around 5 MB can it can't be loaded in simulator, there is an option in simulator settings but if I change it, it does not help, any idea what can be done here?

    B. How can I do ondevice debugging for S40 phone? Any links?

    Thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: Big jar file in Nokia J2me simulator

    A) That is rather normal. If you check the specification pages of Series 40 devices, the usual JAR size limit is 2 megabytes. The recently announced Nokia Asha 501 elevates the limit to 4 megabytes. Larger JAR files work on Symbian devices only. The issue is discussed recently, see http://www.developer.nokia.com/Commu...-JAR-too-large from a week ago, but there is no general solution.

    B) The debugger is available from the Tools section (Resources above, Tools and downloads, Java, More Java downloads on the right, Earlier downloads and scroll a bit down - similar path can be reproduced via Develop above, and picking Nokia Asha, just that does not contain either 'Java' or 'Series 40', so not that intuitive), but it may be easier to find via the documentation (Resources above, Documentation, Java Developers, Introduction to Java ME, Debugging). https://www.developer.nokia.com/info..._ODD_Tool.html is the direct link.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: Big jar file in Nokia J2me simulator

    You cant have a 5MB jar installed on device so my suggestion to you is start reducing the jar file size with a couple of ways.

    1. Reduce image file sizes (think also of the image sizes and if you need them all on that size), use jpg instead of png if u dont need for transparency and use pngout, pngcrush, optipng tools to reduce png file size with out losing quality.
    2. try and combine several smaller images into 1 larger image and then draw only the needed part of it (also known as sprite sheet etc)
    3. use obfuscator such as ProGuard to reduce the overall code size and also optimize it.
    4. encode .wav sounds effects if you have to .mp3
    5. if some data is a must and its simply too large for the jar file think about moving it to a server and load it in runtime (but also think of the limited amount of runtime heap space)

    As for the ondevice debuggin: https://www.developer.nokia.com/info..._ODD_Tool.html

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: Big jar file in Nokia J2me simulator

    Wizard: you beat me with the B answer while i was writing my own response

Similar Threads

  1. how to test j2me application in all Nokia series simulator
    By crajesh_2985 in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2009-09-28, 12:46
  2. Bluetooth GPS simulator for j2me phone
    By vgps in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2007-02-09, 04:30
  3. 7650 simulator and J2ME
    By shahzad73 in forum Mobile Java General
    Replies: 1
    Last Post: 2002-08-07, 05:55
  4. 7210 simulator for J2ME...
    By Pacess in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2002-05-17, 09:56

Posting Permissions

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