From the author of

From the author of

In order to run the code in this example, it is necessary to have installed
the Java Card Development Kit Version 2.1.2 or higher from Sun. The kit is
available for downloads at
http://www.javasoft.com/products/javacard/.

As for the scripts, you will use simple Windows scripting that can be adapted
easily to any Unix-like command-line environment.

A Demonstrative Applet

Listing 1 shows an example of a Java Card applet. It is very simple, but will
serve the purpose of illustrating the deployment of Java Card applets from the
Java source code to the final data transfer into the chip card.

To deploy your applet, follow these steps:

Write the Java source code, and compile it successfully.

Run the converter tool provided with the development kit, which obtains a
CAP file.

Convert the CAP file in a sequence of low-level APDU commands to install
the applet onto the card.

Listing 1 shows the CardTest applet. It is only a demonstrative applet
it does not perform any useful task or use any standard APDU type in the
processing. Nevertheless, it helps you follow all the main steps from the source
development to a basic, on-card applet installation.