| C H A P T E R 6 |
|
Compatibility for Classic Applets |
This chapter describes how to generate application module JAR files from classic applets using the Normalizer tool. These application modules contain classic CAP files and provide compatibility for the Java Card 3 platform by enabling classic applets to run on smart cards with implementations of either the Connected Edition or Classic Edition. See Chapter 7 for more information on CAP files.
Developers use the Normalizer to generate application modules for Java Card 3 Platform classic applets they are creating or from classic applets created for previous versions of the Java Card platform. These application modules contain CAP files and are downloadable on both the Java Card 3 platform Classic Edition and Connected Edition smart cards.
The output from the tool is a classic module that contains the class files, the CAP components of the CAP file, SIO proxies for classic SIOs (if required), and associated classic application descriptors. The input to the tool must be classic CAP files and associated export (EXP) files. If the input files are not classic CAP files, the normalization will fail.
The command line interface for the Normalizer has the following syntax (also see normalize Subcommands in addition of reading this entire section):
normalizer.bat subcommand [options]
| Note - The file to invoke the Normalizer is a batch file (normalizer.bat) that must be run from a working directory of JC_CLASSIC_HOME\bin in order for the code to execute properly. |
The following is a list of the subcommands for the Normalizer:
Use the normalize subcommand and its options to create the package class files. Options are used with the normalize subcommand to specify input files, export paths, export file names, and output directories.
TABLE 6-6 identifies the normalize subcommand options and provides their descriptions.
The following is the format of the normalize subcommand. Options in the subcommand are used in the sequence that are presented in TABLE 6-6. In this format example, an input file and an output directory are specified as options:
normalizer.bat normalize --in file --out directory
The following is an example of the normalize subcommand in which an input file (myCAP.cap) is specified as an option:
normalizer.bat normalize -i myCAP.cap
The copyright subcommand displays the detailed copyright notice. There are no options associated with this subcommand.
The help subcommand displays information about the Normalizer command. Options are used with the help subcommand to specify the information that is displayed about each sub-command.
The following command displays summary help about the Normalizer:
normalizer.bat help
The following command displays help about the normalize subcommand:
normalizer.bat help normalize
Copyright © 2009 Sun Microsystems, Inc. All rights reserved.