Overview of Converting and Exporting Java Class Files

The Converter processes all of the Java class files that make up an application (or a library) and creates a binary file (CAP file) that can be deployed and loaded on a Java Card platform. The class files provided as input to the converter must have the class file major version between 45 (JDK 1.0) and 51 (Java™ SE 7), and it is recommended to use the Java SE 17 compiler to generate them. It also produces other files (export files and JCA files) that are used in the development and deployment process. The CAP file contains a manifest file that provides human-readable information about its content. See Working With CAP Files and Using Export Files, for more information.

Since Java Card Platform Specification, Version 3.1, the CAP file supports the following formats:

  • Compact CAP file format - A compact CAP file contains a single Java Package, a method component of maximum 64 K, and may contain static resources. It can represent an application or a shared library.
  • Extended CAP file format - The extended CAP file format can contain multiple Java packages and a method component larger than 64 K. It gives control over which package should be exported as a shared library.

The compact CAP file is supported in all Java Card products and offers the binary backward compatibility with all previous formats. The extended CAP file is optionally supported in Java Card products, version 3.1 and above.