JavaCard CAP Structure Explorer
Explore JavaCard CAP file structure. Browse all 13 component tags in Oracle's JCVM 3.2 specification, including Static Resources (tag 13, CAP format 2.3), with when each must be present. Decode a Header.cap to confirm the magic, CAP format and package AID, or a Static Resources component to list its resources.
How to use this tool
What it does
Decodes one CAP component pasted as hex, from its tag byte onwards, and lists every component tag the CAP format defines. It does not open a whole CAP or JAR file.
When to use it
Use it when packaging or loading an applet and you need to confirm the CAP's contents and versions.
Worked example
Press Sample to load a Header.cap: the tool checks the 0xDECAFFED magic and shows CAP format 2.2, the ACC_APPLET flag and the package AID. Press Sample again for a Static Resources component (tag 13) holding one 4-byte resource.
Input
Decoded
Component browser
Spec
Oracle JCVM Specification 3.2, Chapter 6 (Table 6-1 component tags).
Companion
Reading
Next step
CAP component reference for what each component tag holds. To build and load applets for production: JavaCard development.
Frequently asked questions
What is a CAP file?
The deployment unit of a JavaCard applet — a set of components carrying the converted class data, in the form the card's installer consumes. It is the output of the converter, not raw class files.
How many CAP components are there?
Oracle's JCVM 3.2 specification defines 13 component tags. Tags 1 to 11 are the original set, Debug (tag 12) arrived with CAP format 2.2, and Static Resources (tag 13) with CAP format 2.3 in Java Card 3.1. A given CAP file carries only the ones that apply, so a file without applets, exports, debug data or static resources has nine.
Which components can be omitted?
Four may be absent. Applet, Export and Static Resources are present only when the package defines applets, exports to other packages or embeds static resources. Debug is optional and is not meant to be downloaded to the card. The other nine, Descriptor included, must be in the CAP file, although loading Descriptor onto the card is optional.
What is the Import component for?
It lists the packages this one depends on, by AID and version. A version mismatch against what is on the card is the usual cause of an installation failure that looks like a corrupt file.
Does anything I paste leave my browser?
Nothing. The tool is entirely client-side: the page ships a static script, does no network calls, and never transmits what you paste. You can confirm it by opening the network tab, or by loading the page and then going offline.