Documentation



Java Card 3 Platform Development Kit User Guide, Classic Edition

Running the Service Sample from the Command Line

To run the Service 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

      Note:

      cref command options are not required in this sample.

  2. Open a second Command Prompt window and perform the following:

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

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

      In this sample, the ant all command builds the applet, executes the 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.

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

Close Window

Table of Contents

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

Expand | Collapse