Overview of Using the Reference Implementation
The Reference Implementation (RI) is a simulator that can be built with a ROM mask, much like a Java Card technology-based implementation for actual field use. It has the ability to simulate persistent memory (EEPROM) and to save and restore the contents of EEPROM to and from disk files. Applets can be installed in the RI, and it performs I/O through a socket interface, simulating the interaction with a card reader (CAD). It implements the T=1, T=CL, or T=0 protocols for communications with the CAD.
The Java Card RI supports the following:
Up to 20 logical channels per communication interface
Integer data type
Object deletion
Card reset in case of object allocation during an aborted transaction
In this version of the development kit, the RI is available as a 32-bit implementation that supports the ability to go beyond the 64KB memory access. The RI supports the T=1 and T=CL in dual concurrent interface mode. This development kit also supports T=0 and T=1, both in single interface mode. Table 10-1 lists the Java Card RE executables by protocol.
Table 10-1 Protocols Supported by RE Executables
RE Executable | Supported Protocol |
---|---|
|
T=0 protocol (single port), as defined in ISO 7816. |
|
T=1 protocol (single port), as defined in ISO 7816. |
|
T=1 and T=CL (each on separate port). Uses T=1 for the contact protocol, and the T=CL for the contactless version, as defined in ISO 14473. This is the default executable for |
Note:
The descriptions, command-line syntax, and options in this chapter for running cref_tdual.exe
also apply to cref_t0.exe
and cref_t1.exe
. The difference is solely in the supported protocols.
The binary versions of the REs available in this development kit are provided in the JC_CLASSIC_HOME\bin
directory as the executables cref_t0.exe
, cref_t1.exe
, and cref_tdual.exe
. Each binary corresponds to the supported protocols described in Table 10-1. The development kit also includes the cref.bat
file whose default is to run the RI with T=1/T=CL, but it can also run the RI using the other supported protocols according to arguments shown in Table 10-2.
Table 10-2 Case Sensitive Command Line Options for cref.bat
Option | Description |
---|---|
|
Specifies the RE version to run according to the desired protocol (see Table 10-1). Defaults to - |
|
Dumps a bytecode histogram at the end of the execution. |
|
Displays the program counter and stack when an exception occurs. |
|
Prints a help screen. |
|
Specifies a file to initialize EEPROM. There can be no spaces in the file name argument. |
|
Performs a trace display of the native methods that are invoked. |
|
Suppresses the printing of a program banner. |
|
Suppresses the printing of memory statistics when execution starts. |
|
Saves the EEPROM contents to the named file. |
|
Specifies the EEPROM file. If the file exists it is read to initialize the EEPROM image. All |
|
Connects to a TCP/IP port using the specified port-number. |
|
Connects to a TCP/IP port using the specified port-number. |
|
Suppresses output. Does not create any output unless followed by other flag options. |
|
Performs a line-by-line trace display of the mask's execution. |
|
Prints only the program's version number. Do not execute. |
|
Prints the resource consumption statistics. |