Java Card Preview Features

Summary

A Java Card Preview Feature is a new feature of the Java Card Platform whose design, specification, and implementation are complete, and yet impermanent, which means that the feature may exist in a different form or not at all in future releases of the Java Card Platform Specification.

The main purpose of introducing a preview feature is to enable application developers to use this feature in real context and provide feedback.

Developer feedback helps determine whether the feature has any design mistakes, which includes hard technical errors (such as a flaw in the type system), soft usability problems (such as a surprising interaction with an older feature), or poor architectural choices (such as one that forecloses on directions for future features). Through this feedback, the feature's strengths and weaknesses are evaluated to determine if the feature has a long-term role in the Java Card Platform, and if so, whether it needs refinement. Consequently, the feature may be granted final and permanent status (with or without refinements), or undergo a further preview period (with or without refinements), or else be removed.

Goals

Non-Goals

Motivation

Evolving the Java Card platform has always faced the following challenges:

Introducing Preview Features would help to:

Description

A Java Card Preview Feature is a new feature of the Java Card API, the Java Card Runtime Environment or the Java Card Virtual Machine whose design, specification, and implementation are complete, and yet impermanent. After a period of broad exposure and evaluation, a Java Card Preview feature may either be upgraded to permanent feature and included in a new version of the Java Card platform specification, or refined and benefit from another preview period, or be completely withdrawn.

Java Card Preview Features have the following properties:

Each version of the Java Card Development Kit is released with the corresponding documentation, including the javadoc for the JCAPI, containing both the permanent API from the platform version used as reference, and using an annotation to highlight all preview features made available in this version of the Java Card Development Kit. Similarly, an annotated version of the JCVM and JCRE are also released when Preview Features impact these documents.

Java Card Preview Features Lifecycle

Java Card Preview Features represent features that are candidates for inclusion in the next version $N+1 of the Java Card Platform Specification. Not all features that will be included in the final version of $N+1 are previewed; some are introduced directly as permanent when version $N+1 is officially released.

A preview feature may go through multiple review iterations. In each iteration, the feature can be refined based on feedback and then reissued as a preview for further evaluation.

Once a preview feature has completed its review period and qualifies to become permanent, it may be published as a finalized preview feature until it is included, unmodified, as a permanent feature of version $N+1. Alternatively, it can be incorporated directly as a permanent feature in version $N+1.

Until version $N+1 is officially released, a licensee may choose to implement a product with the permanent features of version $N, along with a subset of Preview Features targeted for version $N+1.

When version $N+1 is officially released:

Design of Java Card Preview Features

A Java Card Preview Feature has the following design constraints:

Relationship of Preview JCVM/JCRE Features and Preview JCAPI

Most Preview JCAPI features are standalone features with no connection to Preview JCVM or Preview JCRE features.

In contrast, some Preview JCAPI may be co-developed with Preview JCVM or Preview JCRE features either because the preview API is essential to use the preview JCVM or JCRE feature, or convenient to assist usage of the preview JCVM or JCRE feature.

Use of Java Card Preview Features

Because preview features have not achieved final and permanent status in the Java Card Platform, they are unavailable by default at convert time. Developers who wish to use preview features and APIs in their programs must explicitly enable preview features in the Java Card converter.

The Java Card preview features cannot be enabled on an individual basis since all preview features have equal status in the Java Card platform.

The Java Card Development Kit Tools are using the -enable-preview command-line flag to enable all preview features and accept this flag only for the latest (default) JCAPI version or in combination with -target $N where $N is the version of the latest Java Card platform release. The JCDK Tools supporting up to the $N+1 Java Card version cannot be expected to support the preview features defined by $N, since they may have been changed or dropped since Java Card $N.

Versioning of packages with Preview Features

Compatibility rules when a platform supports Preview Features

The compatibility rules defined in JCVM 4.5.2 are modified for platforms that accept loading CAP files using preview versions. When a platform supports preview features for a given package, two cases must be considered: