Running the PhotoCard Sample from the Command Line
To run the PhotoCard sample:
Open a Command Prompt window and perform the following:
Navigate to the JC_CLASSIC_HOME
\bin
directory.Start the RI by using the following command at the command prompt:
cref -o demoee
Starting the RI with the
-o
option and filename causes the RI to save the EEPROM contents to a file nameddemoee
. See Using the Reference Implementation for more information about usingcref
and its command line options.Open a second Command Prompt window and perform the following:
Navigate to the JC_CLASSIC_HOME
\samples\classic_applets\PhotoCard\applet
directory.Enter the following command at the command prompt:
ant all
In this sample's
applet
directory, theant
all
command executes the APDU script, installs the photocard application, and creates an output file (default.out
) in theapplet
directory.
Verify that the contents of the output file in the
applet
directory are the same as the contents of thephotocard-applet.expected.out
file.In the
cref
Command Prompt window, restart the RI by using the following command:cref -z -i demoee
Starting the RI with the
-z
and-i
options and filename causes the RI to use the contents of thedemoee
file to initialize the EEPROM and to display the resource consumption statistics.In the applet Command Prompt window, perform the following:
Navigate to the JC_CLASSIC_HOME
\samples\classic_applets\PhotoCard\client
directory.Enter the following command at the command prompt:
ant all
In this sample's
client
directory, theant
all
command executes the APDU script and generates an output file (actual_output.txt
) in theapplet
directory.
Verify that the contents of the
actual_output.txt
file are the same as the contents of thephotocard-client.expected.out
file.