Running the ObjectDeletion Sample from the Command Line
To run the ObjectDeletion sample:
Open a Command Prompt window and perform the following:
Navigate to the JC_CLASSIC_HOME
\bin
directory.Start the RI by entering the following command at the command prompt:
cref -o e2p
In a different Command Prompt window, perform the following:
Navigate to the JC_CLASSIC_HOME
\samples\classic_applets\ObjectDeletion\applet
directory.Enter the
ant
all
command at the command prompt.In this sample, the
ant
all
command generates the APDU script.
In the
cref
Command Prompt window, stop the RI by usingctrl
+c
.In the
cref
Command Prompt window, restart the RI by entering the following command:cref
-o
e2p
-i
e2p
In the applet Command Prompt window, enter the following command at the command prompt:
ant run1-1
The
ant
run1-1
command executes theod1-1.scr
APDU script and creates an output file in theapplet
directory. The ant script names the output file eitherdefault.out
or the custom name specified in the command line. To specify a custom name for the output file, use the following command:ant
-Dredirect.output
=outputfile_name targetIn this command, outputfile_name represents the name of the output file and target represents either the
all
orrun
options of theant
command. In this case, theall
target is used. This command redirects the output from the APDUtool execution to the outputfile_name file.Verify that the contents of the output file in the
applet
directory are the same as the contents of theod1-1.expected.out
file.In the
cref
Command Prompt window, restart the RI by entering the following command:cref
-o
e2p
-i
e2p
In the applet Command Prompt window, enter the following command at the command prompt:
ant run1-2
The
ant
run1-2
command executes theod1-2.scr
APDU script and creates an output file (default.out
) in theapplet
directory. See Step 5 for the command line required to specify a custom output file name.Verify that the contents of the output file in the
applet
directory are the same as the contents of theod1-2.expected.out
file.In the
cref
Command Prompt window, restart the RI by entering the following command:cref
-o
e2p
-i
e2p
In the applet Command Prompt window, enter the following command at the command prompt:
ant run1-3
The
ant
run1-3
command executes theod1-3.scr
APDU script and creates an output file (default.out
) in theapplet
directory. See Step 5 for the command line required to specify a custom output file name.Verify that the contents of the output file in the
applet
directory are the same as the contents of theod1-3.expected.out
file.In the
cref
Command Prompt window, restart the RI by entering the following command:cref
-o
e2p
-i
e2p
In the applet Command Prompt window, enter the following command at the command prompt:
ant run2
The
ant
run2
command executes theod2.scr
APDU script and creates an output file (default.out
) in theapplet
directory. See Step 5 for the command line required to specify a custom output file name.Verify that the contents of the output file in the
applet
directory are the same as the contents of theod2.expected.out
file.In the
cref
Command Prompt window, restart the RI by entering the following command:cref
-o
e2p
-i
e2p
In the applet Command Prompt window, enter the following command at the command prompt:
ant run2-2
The
ant
run2-2
command executes theod2-2.scr
APDU script and creates an output file (default.out
) in theapplet
directory. See Step 5 for the command line required to specify a custom output file name.Verify that the contents of the output file in the
applet
directory are the same as the contents of theod2-2.expected.out
file.In the
cref
Command Prompt window, restart the RI by entering the following command:cref
-o
e2p
-i
e2p
In the applet Command Prompt window, enter the following command at the command prompt:
ant run3
The
ant
run3
command executes theod3.scr
APDU script and creates an output file (default.out
) in theapplet
directory. See Step 5 for the command line required to specify a custom output file name.Verify that the contents of the output file in the
applet
directory are the same as the contents of theod3.expected.out
file.In the
cref
Command Prompt window, restart the RI by entering the following command:cref
-o
e2p
-i
e2p
In the applet Command Prompt window, enter the following command at the command prompt:
ant run3-2
The
ant
run3-2
command executes theod3-2.scr
APDU script and creates an output file (default.out
) in theapplet
directory. See Step 5 for the command line required to specify a custom output file name.Verify that the contents of the output file in the
applet
directory are the same as the contents of theod3-2.expected.out
file.