Documentation



Java Card 3 Platform Development Kit User Guide, Classic Edition

Running the ObjectDeletion Sample from the Command Line

To run the ObjectDeletion sample:

  1. Open a Command Prompt window and perform the following:

    1. Navigate to the JC_CLASSIC_HOME\bin directory.

    2. Start the RI by entering the following command at the command prompt:

      cref -o e2p

  2. In a different Command Prompt window, perform the following:

    1. Navigate to the JC_CLASSIC_HOME\samples\classic_applets\ObjectDeletion\applet directory.

    2. Enter the ant all command at the command prompt.

      In this sample, the ant all command generates the APDU script.

  3. In the cref Command Prompt window, stop the RI by using ctrl + c.

  4. In the cref Command Prompt window, restart the RI by entering the following command:

    cref -o e2p -i e2p

  5. In the applet Command Prompt window, enter the following command at the command prompt:

    ant run1-1

    The ant run1-1 command executes the od1-1.scr APDU script and creates an output file in the applet directory. The ant script names the output file either default.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 target

    In this command, outputfile_name represents the name of the output file and target represents either the all or run options of the ant command. In this case, the all target is used. This command redirects the output from the APDUtool execution to the outputfile_name file.

  6. Verify that the contents of the output file in the applet directory are the same as the contents of the od1-1.expected.out file.

  7. In the cref Command Prompt window, restart the RI by entering the following command:

    cref -o e2p -i e2p

  8. In the applet Command Prompt window, enter the following command at the command prompt:

    ant run1-2

    The ant run1-2 command executes the od1-2.scr APDU script and creates an output file (default.out) in the applet directory. See Step 5 for the command line required to specify a custom output file name.

  9. Verify that the contents of the output file in the applet directory are the same as the contents of the od1-2.expected.out file.

  10. In the cref Command Prompt window, restart the RI by entering the following command:

    cref -o e2p -i e2p

  11. In the applet Command Prompt window, enter the following command at the command prompt:

    ant run1-3

    The ant run1-3 command executes the od1-3.scr APDU script and creates an output file (default.out) in the applet directory. See Step 5 for the command line required to specify a custom output file name.

  12. Verify that the contents of the output file in the applet directory are the same as the contents of the od1-3.expected.out file.

  13. In the cref Command Prompt window, restart the RI by entering the following command:

    cref -o e2p -i e2p

  14. In the applet Command Prompt window, enter the following command at the command prompt:

    ant run2

    The ant run2 command executes the od2.scr APDU script and creates an output file (default.out) in the applet directory. See Step 5 for the command line required to specify a custom output file name.

  15. Verify that the contents of the output file in the applet directory are the same as the contents of the od2.expected.out file.

  16. In the cref Command Prompt window, restart the RI by entering the following command:

    cref -o e2p -i e2p

  17. In the applet Command Prompt window, enter the following command at the command prompt:

    ant run2-2

    The ant run2-2 command executes the od2-2.scr APDU script and creates an output file (default.out) in the applet directory. See Step 5 for the command line required to specify a custom output file name.

  18. Verify that the contents of the output file in the applet directory are the same as the contents of the od2-2.expected.out file.

  19. In the cref Command Prompt window, restart the RI by entering the following command:

    cref -o e2p -i e2p

  20. In the applet Command Prompt window, enter the following command at the command prompt:

    ant run3

    The ant run3 command executes the od3.scr APDU script and creates an output file (default.out) in the applet directory. See Step 5 for the command line required to specify a custom output file name.

  21. Verify that the contents of the output file in the applet directory are the same as the contents of the od3.expected.out file.

  22. In the cref Command Prompt window, restart the RI by entering the following command:

    cref -o e2p -i e2p

  23. In the applet Command Prompt window, enter the following command at the command prompt:

    ant run3-2

    The ant run3-2 command executes the od3-2.scr APDU script and creates an output file (default.out) in the applet directory. See Step 5 for the command line required to specify a custom output file name.

  24. Verify that the contents of the output file in the applet directory are the same as the contents of the od3-2.expected.out file.

Close Window

Table of Contents

Java Card: 3 Platform Development Kit User Guide, Classic Edition

Expand | Collapse