The CLDC Class Libraries
CLDC
addresses a wide range of platforms that do not have sufficient
memory resources to support the full range of packages and classes
provided by J2SE. Because CLDC is a configuration rather than a
profile, it cannot have any optional features. Therefore, the
packages and classes that it specifies must have a small enough
footprint that they can be hosted by devices that meet only the
minimum requirements of the CLDC specification. The CLDC class
library is very small -- it is composed of a package containing
functionality that is specific to J2ME (called
javax.microedition.io), along with a selection of
classes from the following packages in the core J2SE
platform:[5]
java.iojava.langjava.util
All J2ME configurations and profiles include packages or classes from J2SE. When J2ME incorporates software interfaces from J2SE, it must follow several rules:
The names of the packages or classes must be the same, wherever possible. It would not be acceptable, for example, to completely reimplement the
java.langpackage in a package calledjavax.microedition.langif the API in thejava.langpackage can be used.The semantics of classes and methods that are carried over into J2ME must be identical to those with the same name in J2SE.
It is not possible to add public or protected fields or methods to a class that is shared between J2SE and J2ME.
Because of these rules, J2ME packages and classes will always be a subset of the packages and classes of the same ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access