Question

I'm developing a mobile application using j2me. In my mobile app I connect with another device through bluetooth and perform some operations.

In my mobile application the jar file size is 80KB

I deploy the application in "Nokia c2-00" mobile. When I execute the application the memory of the jar file increases every time. Each time I execute the application the jar file size increases by 5 to 10 KB.

For example I deploy the application in nokia phone (At that time the jar size is 80KB on the mobile) and after running and exiting the application I check the size (it will become 85 KB, after that it increases to 90KB, etc) the size is increased.

I cannot understand why my app size is increased. Please help me figure out why the jar file is increasing in size and how to stop it from doing that.

Was it helpful?

Solution

What kind of thing is your app doing? I have seen this phenomenon when deploying MIDlets to Nokia S40 handsets before, and I attributed it to the app writing data to RMS. So the display is showing space consumed by the JAR, and by the MIDlet itself.

Does this sound like what could be happening?

OTHER TIPS

Move a copy of the inflated / expanded JAR file back to your development platform, extract it and compare it with the original JAR contents to see what is being changed.

Something in your app or some library that your app is using may be adding some file containing some state to the JAR. That's a bad thing to do. The format of a ZIP/JAR file doesn't allow component files to be rewritten in-place. Instead, the new version of the component file has to be appended ... resulting in the JAR file growing.

This is a weird case. The jar should not grow once it is installed... For the jar to grow, its contents must be unpacked and re-packed together with the additional files into a new jar file. This scenario is unlikely to happen.

Anyway, can you share your jar and jad file? I'm thinking of testing this myself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top