×

Discussion Board

Results 1 to 5 of 5
  1. #1
    andu77
    Guest

    LWUITDemo >> WARNING: Jar file is too large to run on actual device.

    I noticed this:
    WARNING: Jar file is too large to run on actual device.

    while running demo project in Nokia SDK 2.0 for Java emulator.
    Jar size is: 1.47 MB (1,542,376 bytes)
    Did anybody run this project on a real device ?
    Is it possible to load only partially LWUIT lib ? It's linked against S40-full-touch.jar of size 810 KB (829,897 bytes)

    Regards,
    Andu.
    Last edited by andu77; 2012-08-27 at 09:46.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: LWUITDemo >> WARNING: Jar file is too large to run on actual device.

    The max jar size allowed varies from device to device (ranging from "small" - e.g., 124KB - to "however much RAM happen to be free at the time the user decides to run the app" - e.g., tens of MB -, or anything in between).

    For different Nokia models, see what the device specs say (see the "Memory Functions" section for each model): http://www.developer.nokia.com/Devic...pecifications/

    I have no idea whether it is possible to just load LWUIT partially (probably not, unless you build it yourself so that you leave out stuff you don't need/use, but that is probably not an easy route, and leads to a maintenance problem).

  3. #3
    Nokia Developer Expert
    Join Date
    May 2012
    Location
    Espoo
    Posts
    224

    Re: LWUITDemo >> WARNING: Jar file is too large to run on actual device.

    Hi andu77,

    Maximum jar size in Java ME is 2 MB. LWUIT demo project is huge one and it has man resources.

    To decrease the jar size, you need to package your application with obfuscate option. In that case, Demo project jar size decrease to around 900KB (962,093 bytes).

    If you create normal hellow LUWIT project with obfuscation option, generated jar file will be around 300 KB.

    I also successfully run Demo project in Asha 305 and 311 without obfuscation option.

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: LWUITDemo >> WARNING: Jar file is too large to run on actual device.

    Quote Originally Posted by bandarap View Post
    Maximum jar size in Java ME is 2 MB. LWUIT demo project is huge one and it has man resources.
    Perhaps there is a Java ME restriction or recommendation, but at least in the case of Nokia's various devices, the max jar size range varies greately below and above 2MB (especially when comparing older Series 40 models to newer models vs. S60/Symbian based models).

  5. #5
    andu77
    Guest

    Re: LWUITDemo >> WARNING: Jar file is too large to run on actual device.

    Launching directly the MIDlet(File/Open) I don't see this warning even if code is not obfuscated(by the way, indeed, obfuscation shrinks a lot!). Probably, message is bogus or it's something hard-coded into emulator FileUtils.createFakeJadAndJar class method(?) ... are emulator sources open/are they obfuscated Anyway I use 'Set maximum jar size (bytes)' option and set it to my device max. for testing.

Similar Threads

  1. jar file working in emulator but not in the actual device
    By jaydeepw in forum Mobile Java General
    Replies: 5
    Last Post: 2010-09-03, 18:07
  2. Porting an app to an actual device
    By nisheethpandey in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2009-02-24, 06:30
  3. [Compile Warning] warning: no newline at end of file
    By SymNLeaner in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 6
    Last Post: 2007-03-07, 08:24
  4. JSR-180 on actual device
    By mkat in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2005-04-27, 13:53
  5. Can't run my APP on actual 7210 device.
    By masklien in forum Mobile Java General
    Replies: 1
    Last Post: 2003-04-02, 11: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
  •  
×