×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    7

    memory problem regarding creating jar files

    Hello Develpers,
    I am a j2me developer and i want to ask u to help me out in a problem. The problem actually is:

    I am creating a jar with the code only there is no problem and the memory is say 40KB.
    I am creating a jar witht the images there is no problem and the memory is say 15 KB
    when i combine the images and the jar together the jar file should be 60Kb but it shows extra 8 Kb to the jar file. Note that I am using gif's, png's and jpeg's format

    Please I'll appreciate ur attention

    regards
    Abdul Latif Gaziani

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Well, jar files also have a catalogue of the files and directories in them, so if you have many of them each will add some overhead to the total. *KB sounds like a bit much, though.

    Things you can do:
    * Obfuscate the code to make it smaller.
    * Put everything in the root directory.
    * Combine several images into one file (you save twice, once for the jar's catalogue overhead, and once for the image header's overhead).
    * Use png optimizers and such software that strips out unnecessary parts of the images to make them smaller.
    * Merge class files into one class that combines the functionality.

    shmoove

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    7

    Plz help out in converting images to one file

    Dear shmoove,
    Thanx for paying attention to my problem. Plz help us in extracting images from a single file as i havent done that thing before. If u have some code snippet or some script regarding that plz help me by that. I'll really appreciate your help.

    regards
    gaziani

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280

Posting Permissions

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