Contents Previous Next Index

Chapter   10

Virtual Machine Topics


The topics in this chapter detail virtual machine specifics.

10.1 Resource Failures

A lack of resources condition (such as heap space) which 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.

10.2 Security Violations

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.

 


Contents Previous Next Index Runtime Environment Specification for the Java Card Platform
Specification, 2.2.1