Generating a CAP File From a Java Card Assembly File

Use the capgen tool to generate a CAP file from a given Java Card Assembly file. The CAP file that is generated has the same contents as a CAP file produced by the Converter. The capgen tool is a backend to the Converter.

Running capgen

To run capgen:

  1. Enter the following on the command line (see Table 7-2 for a description of the options):

capgen.bat [options] filename


The file to invoke capgen is a batch file (capgen.bat) that must be run from a working directory of JC_CLASSIC_HOME\bin in order for the code to execute properly.

Table 7-2 capgen Command Line Options

Option Description


Prints a help message.


Suppresses all banner messages.


Specifies the Java Card Assembly file.

-o filename

Enables you to specify an output file. If the output file is not specified with the -o flag, output defaults to the file a.jar in the current directory.


Outputs the version information.