Java ME Discussion Point
During our period of problems with the Samsung Blackjack a number people recommended that we collapse the package structure in our JAR files. Steve and I have read about this before (ages ago) but we have never really considered implementing it.
And then last night I read this post on the Sun Java Forums. The person in question also mentions this optimisation in another context.
So my question is: what are the benefits of collapsing the directory structure in JAR files? Was this a MIDP 1.0 specific optimisation? Should we use it in the context of MIDP 2.0 only development? Opinions?
~Comments~
~Add Comment~


By collapsing directory structures (and collapsing package names), you are reducing the aggregated length of all package names (since you are reducing the number of and the length of fully qualified class names), which results in reducing the overall size of the generated bytecode.
Yes, obfuscation helps with this.
ceo
Ah ha! Light goes on. Do collapsed package names serve any other purpose other than size? Do you know of any JVM's that battle with long package names/directory structures?
Thanks. :)
1. to help make code uglier and unmaintainable -- call it job security!
2. no, i dunno of any
:-)
ceo