Java is a very popular programming platform for small devices like cellular phones. The recent open-source release of the Java 2 Platform, Micro Edition (J2ME) environment has made it an open standard icon of the programming-in-the-small paradigm. This paper presents a good overview of how memory is used within J2ME, and how to use it better. Saving 20 kilobytes of silicon storage may seem to be a vain pursuit for users of Java 2 Platform, Standard Edition (J2SE), for whom memory is measured in mega- and gigabytes. Yet, this small treatise on why the effort is worthwhile, and on how to make it fruitful, is sensibly argued and well written.
The presentation is practical. The paper introduces architectural details and experimental data aimed primarily at justifying a shortlist of 11 guidelines for downsizing J2ME memory consumption. Some guidelines, such as “avoid small classes,” could be faulted for highlighting the need to bend principles of good design (single responsibility classes) in favor of optimization for memory economy. But, in the end, it is impossible to argue with out-of-memory errors.
It would have been nice if more experimental data had been made available. The quantitative results shown are truly a bare minimum, but the lack of any commercial bias makes them appear acceptable; further experimental confirmation would still be welcome. The work is refreshingly short and to the point, and offers good advice for the J2ME practitioner.