Running the Samples from the Command Line
To build and run the samples:
- In a Command Prompt window, start the Java Card simulator by using the
cref
command with the options specified by the sample.See Using the Reference Implementation for more information about using
cref
and its command line options. - In a second Command Prompt window, from the sample directory containing the appropriate
build.xml
file, run theant
command with the appropriate target:ant
targetIn the command, target represents the
run
option (such asall
orrun1-1)
specified in the procedures for running the sample. Each sample might use one or more targets to run specific APDU scripts or multiple parts of the sample applet. The required targets are described in the procedures used to run an individual sample.With the exception of the Transit, RMIPurse, and SecureRMIPurse samples, a custom name can be specified for the output file generated by the
ant
command. Use the following command syntax to specify a custom name for the output file:ant
-Dredirect.output
=outputfile_name targetIn this command, outputfile_name represents the name of the output file. This command redirects the output from the APDUtool execution to the outputfile_name file.
- Perform any additional actions required by the individual sample's run procedure.
Additional actions might include restarting the RI and using
ant
with an appropriate target to run additional APDU scripts generated by the build. These actions are described in the procedures used to run each sample.