The general goal of CLDC 8 is to support all of the features of the The Java® Language Specification, Java SE 8 Edition as is feasible within the strict memory limits of CLDC target devices. Due to the restrictions of the CLDC Virtual Machine as defined in [Adherence to The Java Virtual Machine Specification] there are certain language features in The Java® Language Specification, Java SE 8 Edition that can not be used for CLDC.
This chapter summarizes these restrictions on features of The Java® Language Specification, Java SE 8 Edition.
For the remainder of this specification, The Java® Language Specification, Java SE 8 Edition will be referred to as JLS8. Sections within The Java® Language Specification Java SE 8 Edition will be referred to using the § symbol. For example, (JLS8 §4.2.4).
These language features are discussed in more detail below.
A Virtual Machine conforming to CLDC does not support finalization of class instances (JLS8 §12.6). No application built to conform to the Connected Limited Device Configuration shall require that finalization is available.
Finalization as an approach to cleanup resources has been deprecated due to its fragile nature and non-deterministic behavior in multi-threaded concurrency.
A Virtual Machine conforming to CLDC provides multithreading (JLS8 §17), but does not have support for thread groups or daemon threads. Thread operations such as starting of threads can be applied only to individual thread objects. If application programmers want to perform thread operations for groups of threads, explicit collection objects must be used at the application level to store the thread objects.
In contrast, the set of error classes included in the CLDC libraries is
limited, and consequently the error handling capabilities of CLDC are
considerably more limited.
By default, a Virtual Machine conforming to CLDC supports
only a very limited set of error classes from java.lang
as defined in the API Javadoc.
When encountering any other error, the Virtual Machine throws an Error
that is the
nearest CLDC-supported superclass of the Error
class
that must be thrown according to The Java® Language Specification, Java SE 8 Edition
If the Virtual Machine conforming to CLDC implements additional error
checks that are part of The Java® Language Specification, Java SE 8 Edition
but that are not required by the CLDC Specification,
the implementation shall throw the nearest CLDC-supported
superclass of the Error
class that is defined
by The Java® Language Specification, Java SE 8 Edition.
CLDC does not support Lambda Expressions (JLS8 §15.27).
CLDC does not support static or default methods on interfaces (JLS8 §9.4).
Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.