Java Reference
In-Depth Information
L ISTING 5.8 The Converter Input Options File Cardtest.opt .
-exportpath exp\
-applet 0x1:0x0:0x0:0x0:0x1:0x3:0x1:0x0:0x1:0x1 com.marinilli.b2.c5.CardTest
0x1:0x0:0x0:0x0:0x1:0x3:0x1:0x0:0x1 1.0
The options file (listed in Listing 5.8) instructs the converter tool to produce EXP , JCA , and CAP
files as output of the conversion. JCA files are pseudo-assembly text files, from which CAP
files could be created; we will not use them here. The -exportpath command-line switch
defines where the required EXP files (needed for linking libraries) are located. The -applet
option defines the applet's AID and its Java class. In this example, the AID is totally invented.
Finally, package name, package AID, and major version followed by minor version (separated
by a dot) are provided to the converter.
Sun also supplies a tool for viewing the contents of an EXP file. When invoking it as in the
following, it will produce the text representation of the EXP file created by the converter from
our applet class file:
java -classpath %_CLASSES% com.sun.javacard.converter.Exp2Text -classdir com/
Such a file is reported in Listing 5.9.
L ISTING 5.9 The Human-Readable Representation of the CardApplet EXP File
export file { // com/marinilli/b2/c5
magic 00FACADE // in hex
minor_version 1
major_version 2
constant_pool_count 2
constant_pool {
Constant_Utf8_info {
tag 1
length 19
bytes com/marinilli/b2/c5
CONSTANT_Package_info {
tag 13
flags 0
name_index 0 // com/marinilli/b2/c5
minor_version 0
major_version 1
aid_length 9
Search WWH ::

Custom Search