| [ directory ] |
|
4.3 Java Language Specification CompatibilityThe general goal for a virtual machine conforming to CLDC is to be as compliant with the Java™ Language Specification as is feasible within the strict memory limits of CLDC target devices. This section summarizes the differences between a virtual machine conforming to CLDC and the Java Virtual Machine of Java 2 Standard Edition (J2SE). Except for the differences indicated herein, a virtual machine conforming to CLDC is compatible with The Java™ Language Specification, Second Edition, by James Gosling, Bill Joy, Guy L. Steele, and Gilad Bracha, Addison-Wesley, 2000, ISBN 0-201-31008-2. Note For the remainder of this book, the Java™ Language Specification is referred to as JLS. Sections within the Java™Language Specification are referred to using the § symbol. For example, (JLS §4.2.4). 4.3.1 No Finalization of Class InstancesCLDC libraries do not include the method java.lang.Object.finalize(). Therefore, a virtual machine conforming to CLDC does not support finalization of class instances (JLS §12.6). No application built to conform to the Connected, Limited Device Configuration can require that finalization be available. 4.3.2 Error-Handling LimitationsA virtual machine conforming to CLDC generally supports exception handling as defined in JLS Chapter 11, with the exception that asynchronous exceptions (JLS §11.3.2) are not supported. In contrast, the set of error classes included in CLDC libraries is limited, and consequently the error-handling capabilities of CLDC are considerably more limited. This is because of two reasons:
A virtual machine conforming to CLDC provides a limited set of error classes defined in Section 5.2.7, "Exception and Error Classes." When encountering any other error, the implementation behaves as follows:
If the virtual machine conforming to CLDC implements additional error checks that are part of the Java™ Language Specification 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. |
| [ directory ] |
|