Using Java Card Development Kit Tools

Use the Java Development Kit to compile your applet. Then, use the converter tool from the Java Card Development Kit Tools to convert the compiled Java file (.class file) to a Java Card CAP file.

A Java Card CAP file is a JAR file containing the binary representation of a unit of code, made of one or more Java packages. It can be distributed for deployment on real devices running Java Card or simulators.

The Deployment process consists of verifying the CAP file and installing the code on the device. The verifier tool from the Java Card Development Kit Tools does the verification. The installation depends on the target device and uses the specific installation tools.

To deploy the CAP files on the Java Card simulator (cref), use the scriptgen tool, which produces an installation script, made of APDU commands, that can then be transmitted to the Java Card simulator using the apdutool tool. The following illustration depicts the Java Card tool chain.

Figure 3-2 Java Card Tool Chain



Note that you can use the Converter tool to produce Java Card Assembly (JCA) files. A JCA file is a textual representation of a converted package that you can use to aid testing and debugging. You can use a JCA file as an input to the capgen tool to create a CAP file. The following illustration depicts this process.

Figure 3-3 Using Java Card Assembly