Documentation



Java Card 3 Platform Development Kit User Guide, Classic Edition

Overview of Converting and Exporting Java Class Files

The Converter preprocesses all of the Java class files that make up a package, and converts the package to a CAP file. The Converter also produces an export file.

Checks on the input classes include:

  • Must be legal according to the Java Card Virtual Machine specification

  • Must be Java SE 7 or earlier.

  • All input class files are compatible with each other.

  • Export files of imported packages are consistent with class files that were used for compiling the converting package.

The Converter generates the following output files:

  • A CAP file, which is a JAR-format file which contains the executable binary representation of the classes in a Java package.

  • Java Card Assembly file.

  • Export file.

If the package to be converted contains remote classes or interfaces or if the -debug option is specified, the Converter generates a CAP file suitable for version 2.2 or greater of the Java Card platform. Otherwise, the Converter generates files that can also be used by version 2.1 of the Java Card platform. To create a CAP file compatible with version 2.1 of the Java Card platform, you must also use export files for Java Card API packages from the Java Card 2.1.x development kit.

The Converter tool can only convert one package at a time. If you are converting more than one package with interdependencies, convert the packages in two passes. First, generate only the export files, then, after that, convert the required CAP or Java Card Assembly files.

If you have a source release, you may choose to convert packages that import other packages. If you are creating Java Card Assembly files to generate a mask, then the major and minor version number of the imported packages must agree with the version number of the package that imports them. See Version Numbers for Processed Packages for more information.

If you have a source release, you can localize locale-specific data associated with the Converter. Before you use the Converter tool, be sure to compile your Java code properly as described in Setting Java Compiler Options. For more information, see Localizing With The Development Kit.

For more information on the CAP file and its format, see the Virtual Machine Specification, Java Card Platform, Version 3.0.5, Classic Edition. The CAP file also contains a manifest file that provides human-readable information regarding the package that the CAP file represents. For more information on the manifest file and its contents, see Working With CAP Files.

For more information on the Java Card Assembly file, see Java Card Assembly Syntax Example and Producing a Mask File from Java Card Assembly Files. For more information on export files, see Using Export Files.

Close Window

Table of Contents

Java Card: 3 Platform Development Kit User Guide, Classic Edition

Expand | Collapse