The Java Card platform Workstation Development Environment (“Java Card Workstation Development Environment” or “Java Card WDE”) tool allows the simulated running of a Java Card applet as if it were masked in ROM. It emulates the card environment.
The Java Card WDE is not an implementation of the Java Card virtual machine. It uses the Java virtual machine to emulate the Java Card RE. Class files that represent masked packages must be available on the classpath for Java Card WDE.
For the 2.2.1 release of the Java Card reference implementation, Java Card WDE adds support for Java Card Remote Method Invocation (Java Card RMI).
Here are some of Java Card RE features that are not supported by Java Card WDE:
The Java Card WDE tool uses the jcwde.jar
, api.jar
(with cryptography extensions), and apduio.jar
files. The main class for Java Card WDE is com.sun.javacard.jcwde.Main
. A sample batch and shell script are provided to start Java Card WDE.
Before you run the Java Card WDE tool, you must ensure that the environment variables are set appropriately and the applets to be configured are listed in a configuration file.
To set the environment variables correctly, refer to "Setting Environment Variables for the Solaris or Linux Platform" or "Setting Environment Variables for Microsoft Windows 2000 Platform".
The applets to be configured in the mask during Java Card WDE simulation need to be listed in a configuration file that is passed to the Java Card WDE as a command line argument. Also, the CLASSPATH
environment variable needs to be set to reflect the location of the class files for the applets to be simulated. In this release, the sample applets are listed in a configuration file called jcwde.app
. Each entry in this file contains the name of the applet class, and its associated AID.
The configuration file contains one line per installed applet. Each line is a white space(s) separated {CLASS_NAME AID}
pair, where CLASS NAME
is the fully qualified Java name of the class defining the applet, and AID
is an Application Identifier for the applet class used to uniquely identify the applet. AID
may be a string or hexadecimal representation in form:
where the construct 0xXX
is repeated as many times as necessary.
Note that AID
should be 5 to 16 bytes in length.
For example:
If you write your own applets for public distribution, you should obtain an AID for each of your packages and applets according to the directions in Section 4.2 of the Virtual Machine Specification for the Java Card™ Platform, Version 2.2.1 (Sun Microsystems, Inc., 2003), and in the ISO 7816 Specification Parts 1-6.
The general format of the command to run the Java Card WDE and emulate the Java Card RE is:
where:
When started, Java Card WDE starts listening to APDUs in T=0 format on the TCP/IP port specified by the –p
port parameter. The default port is 9025.
Development Kit User's Guide
for the Binary Release with Cryptography Extensions Java Card Platform, Version 2.2.1 |
Copyright © 2003 Sun Microsystems, Inc. All rights reserved.