A Java Card CAP (Converted Applet) file contains a binary representation of a package of classes that can be installed on a device and used to execute the package’s classes on a Java Card virtual machine. Java Card applets (CAP file) are written in the Java programming language, because applets are designed to run in the very small memory space of a smart card, they’re coded using an appropriate subset of the Java programming language. CAP file contents, such as class information, executable bytecodes, linking information, verification information, and so forth. The CAP file format is optimized for a small footprint by using compact data structures and limited indirection. It defines a bytecode instruction set that is based on and optimized from the Java bytecode instruction set. A CAP file is produced by a Java Card converter when a package of classes is converted. When a CAP file is downloaded and installed into a Java Card the applets are identified in the configuration file by their Application Identifier (AID).

A CAP file can be unzipped. When unzipped the CAP file, you get the following component:

Header.cap: Contains general information about the CAP file.
Directory.cap: Lists the size of each of the components defined in the CAP file.
Applet.cap: Contains an entry for each of applets defined in the package.
Import.cap: Lists the set of packages imported by the classes in the package.
ConstantPool.cap: Contains an entry for each of the classes, methods,and fields referenced by elements in the Method Component.
Class.cap: Describes each of the classes and interfaces defined in the package.
Method.cap: Describes each of the methods declared in this package exclude interface method declaration.
StaticField.cap: Contains all of the information required to create and initialize an image of all of the static fields defined in the package.
RefLocation.cap: Contains all of the linked information that is used in the Method component
Export.cap: Lists all static elements in the package that may be imported by classes in other packages.
Descriptor.cap: Provides sufficient information to parse and verify all elements of the CAP file.
Debug.cap: Contains all necessary meta data for debugging a package.

 

Related Products

Related Articles

GlobalPlatform SE for IoT workshop: IoT end-to-end security, privacy, simplicity and convenience

March 19th, 2021|

03-19-2021 -- GlobalPlatform, alongside Prime Sponsor, Oracle, and Supporting Sponsors, STMicroelectronics and Able Device, is hosting a free technical workshop on April 13-14 with  extended virtual exhibition hours on April 15. Experts will educate delegates and offer use cases and demonstrations to explain how stakeholders

STMicroelectronics and Fingerprint Cards Cooperate to Develop and Launch an Advanced Biometric Payment Card Solution

July 9th, 2020|

Geneva, Switzerland and Göteborg, Sweden, July 9, 2020 – STMicroelectronics (NYSE: STM), a global semiconductor leader serving customers across the spectrum of electronics applications, has teamed with world-leading biometric company Fingerprint Cards AB (Fingerprints) to develop an advanced Biometric System-on-Card

Synonyms:
.cap
Categories: Java Card
« Back to Glossary Index