A P P E N D I X A

Application Module and Library Formats

This appendix describes the application module and library formats supported by the Java Card 3 platform card manager. Applications are distributed and deployed as application module JAR files. The application module distribution format JAR file contains one application. Libraries are distributed and deployed as standard library JAR files containing the library classes.

There are two types of library formats:

- The extension library JAR file is a standard library JAR format containing Java class files. Extension library classes are accessible to all applications on the card. Instances of classes instantiated from the extension library are placed in the owner context of the application which creates the instance.

- The classic library JAR file is a standard JAR library format containing Java class files. Classic library classes are only accessible to the classic applications on the card. Instances of classes instantiated from the classic library are placed in the owner context of the classic application which creates the instance.

This appendix contains the following sections:

- Web Application Module Format

- Extended Applet Application Module Distribution Format

- Classic Applet Application Module Format

- Extension Library Format

- Classic Library Format

##

Web Application Module Format

FIGURE A-1 shows the directory structure of the web application module distribution format. The structure must be that of the web archive (`.war`) file with the following differences:

- No support for application private library directory `WEB-INF\lib`

- An additional Java Card 3 platform-specific application descriptor file `javacard.xml` is supported. The format of this descriptor is specified in Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition.

FIGURE A-1 Web Application Module Format

See the Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition for specific details about the web application module format.

##

Extended Applet Application Module Distribution Format

FIGURE A-2 shows the directory structure of the extended applet application module format. See the Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition for specific details.

FIGURE A-2 Extended Applet Application Module

See the Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition for specific details about the extended applet application module format.

##

Classic Applet Application Module Format

FIGURE A-3 shows the directory structure of the classic applet application module distribution format. The structure is similar to that of the extended applet application module with the following differences:

- The `classes` directory contains only one package and optionally a subpackage named `proxy` containing SIO proxy classes.

- The Classic Edition’s CAP file components, `*.cap`, are included in the JAR file.

See the Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition for specific details about the requirements of the classic applet application module format.

FIGURE A-3 Classic Applet Application Module

##

Extension Library Format

The extension library distribution format uses the Java Platform Standard Edition library JAR file structure. FIGURE A-4 shows the format of a Java Platform Standard Edition library JAR file format.

FIGURE A-4 Java Platform Standard Edition Library JAR File Format

See the Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition for specific details about the extension library format.

##

Classic Library Format

FIGURE A-5 shows the format of a classic library distribution format. The classic library distribution format uses the Java Platform Standard Edition library JAR file format (see FIGURE A-4) with the following restrictions and additions:

- It contains only one package and, optionally, a subpackage `proxy` containing SIO proxy classes.

- It includes the classic CAP file components, `*.cap`, in a directory named `javacard` that is in a subdirectory representing the library package directory as described in Virtual Machine Specification, Java Card Platform, Version 3.0.1, Classic Edition. The format of the CAP file components are described in Virtual Machine Specification, Java Card Platform, Version 3.0.1, Classic Edition.

See the Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition for specific details about the classic library format.

FIGURE A-5 Classic Library Distribution Format

Copyright © 2009 Sun Microsystems, Inc. All rights reserved.