Documentation



Java Card 3 Platform Development Kit User Guide, Classic Edition

File Naming for the Converter

This section describes the names of input and output files for the Converter, and gives the correct location for these files. With some exceptions, the Converter follows the Java programming language naming conventions for default directories for input and output files. These naming conventions comply with the definitions in the Virtual Machine specification.

This section includes the following:

Input File Naming Conventions

The files input to the Converter are Java class files named with the.class suffix. Generally, there are several class files making up a package. All the class files for a package must be located in the same directory under the root directory, following the Java programming language naming conventions. The root directory can be set from the command line using the -classdir option. If this option is not specified, the root directory defaults to the directory from which the user invoked the Converter.

Suppose, for example, you want to convert the package java.lang. If you use the -classdir flag to specify the root directory as C:\mywork, the command line is:

converter -classdir C:\mywork java.lang package_aid package_version

where package_aid is the application ID of the package and package_version is the user-defined version of the package.

The Converter looks for all class files in the java.lang package in the directory C:\mywork\java\lang.

Output File Naming Conventions

The name of the CAP file, export file, and the Java Card Assembly file must be the last portion of the package specification followed by the extensions.cap,.exp, and.jca, respectively.

By default, the files output from the Converter are written to a directory called javacard, a subdirectory of the input package's directory.

In the above example, the output files are written by default to the directory C:\mywork\java\lang\javacard.

The -d flag enables you to specify a different root directory for output.

In the above example, if you use the -d flag to specify the root directory for output to be C:\myoutput, the Converter writes the output files to the directory C:\myoutput\java\lang\javacard.

When generating a CAP file, the Converter creates a Java Card Assembly file in the output directory as an intermediate result. If you do not want a Java Card Assembly file to be produced, omit the option -out JCA. The Converter deletes the Java Card Assembly file at the end of the conversion.

Verification of Input and Output Files

By default, the Converter invokes the Java Card technology-based off-card verifier ("Java Card off-card verifier") for every input EXP file and on the output CAP and EXP files.

  • If any of the input EXP files do not pass verification, then no output files are created.

  • If the output CAP or EXP files does not pass verification, then the output EXP and CAP files are deleted.

If you want to bypass verification of your input and output files, use the -noverify command line option. Note that if the Converter finds any errors, output files are not produced.

Creating a debug.msk Output File

To create a debug.msk output file:

  1. Set the -mask and -debug options described in Table 5-1 when you run the Converter.
  2. Verify that the file debug.msk is created in the same directory as the other output files.
Close Window

Table of Contents

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

Expand | Collapse