C H A P T E R  4

Custom Types

The custom types available for the Ant tasks are described in this chapter.


AppletNameAID

AppletNameAID groups together name and AID for a Java Card applet.


TABLE 4-1 Parameters for ApplietNameAID

Attribute

Description

Required

appletname

Fully qualified name of the Java Card applet.

Yes

aid

AID (Application Identifier) of the Java Card applet.

Yes


Example

Set the fully qualified name and AID for the HelloWorld applet.


<AppletNameAID
appletname="com.sun.javacard.samples.HelloWorld.HelloWorld"
aid="0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1"/>


JCAInputFile

This type is a simple wrapper for a fully qualified JCA file name or a name of an input file that contains a list of input JCA files. In case the input file contains a list of input JCA files, the name of the file should be prepended with "@".


TABLE 4-2 Parameters for JCAInputFile

Attribute

Description

Required

inputfile

Fully qualified name of the input file

Yes


Examples

Set the fully qualified name of an input JCA file.


<jcainputfile 
   inputfile="C:\jcas\common\com\sun\javacard\installer
\javacard\installer.jca" />

Set the fully qualified name of an input file that contains a list of JCA files.


<jcainputfile inputfile="@C:\jc\mathDemo.in" />


ExportFiles

This type is actually the Ant FileSet type. It is used to specify a group of export files for the off-card verifier. For details, see Apache Ant documentation for FileSet type.

Examples

The following example sets the fully qualified name of an input EXP file.


<exportfiles 
   file="C:\samples\classes\com\sun\javacard\samples
\HelloWorld\javacard\HelloWorld.exp"

The following example groups all the files in the directory ${server.src} that are EXP files and do not have the text Test in their names.


<exportfiles dir="${server.src}"> 
  <include name="**/*.exp"/> 
  <exclude name="**/*Test*"/>
</exportfiles>