C H A P T E R 10 |
Virtual Machine Topics |
This chapter details virtual machine resource failures and security violations.
A lack of resources condition, such as heap space, that is recoverable shall result in a SystemException with reason code NO_RESOURCE. The factory methods in JCSystem used to create transient arrays throw a SystemException with reason code NO_TRANSIENT_SPACE to indicate lack of transient space.
All other (non-recoverable) virtual machine errors, such as stack overflow, shall result in a virtual machine error. These conditions shall cause the virtual machine to halt. When such a non-recoverable virtual machine error occurs, an implementation can optionally require the card to be muted or blocked from further use.
The Java Card RE throws a java.lang.SecurityException exception when it detects an attempt to illegally access an object belonging to another applet across the firewall boundary. A java.lang.SecurityException exception may optionally be thrown by a Java Card VM implementation to indicate a violation of fundamental language restrictions, such as attempting to invoke a private method in another class.
For security reasons, the Java Card RE implementation may mute the card instead of throwing the exception object.
Copyright © 2005, Sun Microsystems, Inc. All Rights Reserved.