Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:2.2.1.1_unsupported_features

2.2.1.1 Unsupported Features

Dynamic Class Loading

Dynamic class loading is not supported in the Java Card platform. An implementation of the Java Card platform is not able to load classes dynamically. Classes are either masked into the card during manufacturing or downloaded through an installation process after the card has been issued. Programs executing on the card may only refer to classes that already exist on the card, since there is no way to download classes during the normal execution of application code.

Security Manager

Security management in the Java Card platform differs significantly from that of the Java platform. In the Java platform, there is a Security Manager class (java.lang.SecurityManager) responsible for implementing security features. In the Java Card platform, language security policies are implemented by the virtual machine. There is no Security Manager class that makes policy decisions on whether to allow operations.

Finalization

Finalization is also not supported. finalize() will not be called automatically by the Java Card virtual machine.

Threads

The Java Card virtual machine does not support multiple threads of control. Programs for the Java Card platform (“Java Card programs”) cannot use class Thread or any of the thread-related keywords in the Java programming language.

Cloning

The Java Card platform does not support cloning of objects. Java Card API class Object does not implement a clone method, and there is no Cloneable interface provided.

Access Control in Java Packages

The Java Card platform language subset supports the package access control defined in the Java language. However, the cases that are not supported are as follows.

  • If a class implements a method with package access visibility, a subclass cannot override the method and change the access visibility of the method to protected or public.
  • A public class cannot contain a public or protected field of type reference to a package-visible class.
  • A public class cannot contain a public or protected method with a return type of type reference to a package-visible class.
  • A public or protected method in a public class cannot contain a formal parameter of type reference to a package-visible class.
  • A package-visible class that is extended by a public class cannot define any public or protected methods or fields.
  • A package-visible interface that is implemented by a public class cannot define any fields.
  • A package-visible interface cannot be extended by an interface with public access visibility.
Typesafe Enums

The Java Card platform language subset does not support the enumerated type facility and the keyword enum.

Enhanced for Loop

The Java Card platform language subset does not support the enhanced for loop language construct. Support for the enhanced for loop construct requires support for array indexing using the integer data type. The Java Card platform only supports array indexing using the short data type.

Varargs

The Java Card platform language subset does not support variable-length argument lists. The variable-length argument construct requires the compiler to generate code that creates a new array object each time a variable-length argument array method is invoked, thereby causing implicit memory allocations in Java Card runtime memory heap.

Runtime Visible Metadata_Annotations

The Java Card platform does not support this language feature which lets you introduce meta-data information into the runtime environment to be accessed reflectively. The Java Card platform does not support reflection.

Assertions

The Java Card runtime does not provide runtime support for statements in the Java programming language called assertions that are used to test assumptions about program functionality.

javacard/jcvm/2.2.1.1_unsupported_features.txt · Last modified: 2017/05/13 04:08 (external edit)