Java Reference
In-Depth Information
The distinction between the CLDC 1.0 and 1.1 releases may or may not affect your
development approach, as the overwhelming majority of new devices sold today support
CLDC 1.1 (or the CDC, in fact, for some higher-end devices). For example, as I write this,
virtually all wireless operators' Java-enabled feature phones —those phones subsidized by
operators to provide a mix of features at a low cost to drive both voice and data uses—are
CLDC 1.1-compliant. Even accounting for device churn (the rate at which users buy new
devices), there are countless CLDC 1.0 devices on the market, and a savvy developer may
well be able to wring revenue from these users. On the other hand, many of the com-
pelling features of the Java ME platform (available through packages documented by the
JSR process, as I discuss in Chapter 1), such as multimedia and 3D graphics, are only
available on relatively new handsets, which typically run CLDC 1.1 and MIDP 2.0 or 2.1.
As a result, when you plan your application, you should balance the need for APIs pro-
vided by a later version of the CLDC or MIDP with the business case provided. You'll need
to answer this question: do the technology requirements for your application so drasti-
cally reduce the number of devices on which you can deliver your application that your
business case becomes invalid? This is a common theme for cutting-edge Java ME devel-
opers, but less so now than in years past, and over time (as I discuss in the section
“Looking Toward the Future of the CLDC” in this chapter) it should diminish entirely.
Understanding the Present: CLDC 1.1
Cost and power consumption significantly limit the capabilities of even today's mobile
devices. While consumer demand for high-capability personalizable devices remains
high, manufacturing cost remains a key factor and drives the selection of low-cost com-
ponents (meaning less memory, slower processors, and so forth). While Moore's law has
driven ever-faster and ever-cheaper devices in the hands of consumers, power sources
have been unable to keep up, making power management another key challenge for
mobile devices. Consequently, there continues to be constrained devices and a role for
the CLDC on those devices.
Specifically, CLDC 1.1 differs from Java SE in the following ways:
CLDC 1.1 offers no finalization of object instances : CLDC libraries, by definition,
do not include the method Object.finalize .
CLDC 1.1 doesn't support asynchronous exceptions : The virtual machine does not
throw asynchronous exceptions, and you cannot invoke Thread.stop , as it doesn't
exist in the CLDC.
CLDC 1.1 supports only a limited number of the java.lang.Error subclasses :
For other errors, the CLDC either halts the virtual machine in an implementation-
specific manner or throws the nearest defined java.lang.Error subclass. (See the
“Changes to java.lang.Exception” section later in this chapter.)
 
Search WWH ::




Custom Search