Compact CAP File and Manifest File Syntax
A CAP file utilizes the JAR file format, and contains a set of components that describe a Java language package. In addition to the components, the CAP file also contains the manifest file META-INF/MANIFEST.MF
. The manifest file provides additional human-readable information regarding the contents of the CAP file and the package that it represents. You can use this information to facilitate the distribution and processing of the CAP file.
The following information applies to the version 2.3 compact CAP files generated with the version 3.1.0 Converter and version 2.2 or 2.1 CAP files generated with the version 3.1.0 or later Converter.
The information in the manifest file is presented in name:value pairs. These name:value pairs are described in Table 6-1.
Table 6-1 Name:Value Pairs in the MANIFEST.MF File
Name | Value |
---|---|
Java-Card-CAP-Creation-Time |
Creation time of CAP file. For example:
The format of the time stamp is operating system-dependent. |
Java-Card-Converter-Version |
The version of the converter tool. Default: |
Java-Card-Converter-Provider |
Provider of the converter tool. For example:
|
Java-Card-CAP-File-Version |
CAP file major.minor version. Possible values are: |
Java-Card-Package-Version |
The major.minor version of package. For example: |
Java-Card-Package-AID |
AID for the package. For example:
|
Java-Card-Package-Name |
The fully-qualified package name in dot (.) format. For example: |
Java-Card-Applet-<n>-AID |
The AID for applet n. For example: |
Java-Card-Applet-<n>-Name |
Simple class name for applet n. For example: |
Java-Card-Import-Package-<n>-AID |
The AID for imported package n. For example: |
Java-Card-Import-Package-<n>-Version |
The major.minor version of imported package n. For example: |
Java-Card-Integer-Support-Required |
Can be |
The properties in the manifest file include:
-
The names
Java-Card-Applet-<n>-AID
andJava-Card-Applet-<n>-Name
refer to the same applet. -
The converter assigns numbers for the
Java-Card-Applet-<n>-NAME
andJava-Card-Applet-<n>-AID
names in sequential order, beginning with 1. -
The names
Java-Card-Imported-Package-<n>-AID
andJava-Card-Imported-Package-<n>-Version
refer to the same package. -
The converter assigns numbers for the
Java-Card-Imported-Package-<n>-AID
andJava-Card-Imported-Package-<n>-AID
names in sequential order, beginning with 1.
Sample Manifest File
The following code sample illustrates the manifest file that the Converter generates when it converts package jcard.applications
. This package contains two applets, MyClass1 and MyClass2.
Manifest-Version: 1.0 Created-By: 1.3.1 (Oracle Corporation) Java-Card-CAP-Creation-Time: Tue Jan 15 11:07:55 PST 2010 Java-Card-Converter-Version: 1.3 Java-Card-Converter-Provider: Oracle Corporation Java-Card-CAP-File-Version: 2.1 Java-Card-Package-Version: 1.0 Java-Card-Package-Name: jcard.applications Java-Card-Package-AID: 0xa0:0x00:0x00:0x00:0x62:0x03:0x01:0x0c:0x07 Java-Card-Applet-1-Name: MyClass1 Java-Card-Applet-1-AID: 0xa0:0x00:0x00:0x00:0x62:0x03:0x01:0x0c:0x07:0x05 Java-Card-Applet-2-Name: MyClass2 Java-Card-Applet-2-AID: 0xa0:0x00:0x00:0x00:0x62:0x03:0x01:0x0c:0x07:0x06 Java-Card-Imported-Package-1-AID: 0xa0:0x00:0x00:0x00:0x62:0x00:0x01 Java-Card-Imported-Package-1-Version: 1.0 Java-Card-Imported-Package-2-AID: 0xa0:0x00:0x00:0x00:0x62:0x01:0x01 Java-Card-Imported-Package-2-Version: 1.1 Java-Card-Integer-Support-Required: TRUE