Running the JavaPurseExtCap Sample from the Command Line

  1. Open a Command Prompt window and perform the following:
    1. Navigate to the JC_HOME_SIMULATOR\bin directory.
    2. Start the simulator by using the following command at the command prompt:
      cref
  2. Open a second Command Prompt window and perform the following:
    1. Set ANT_HOME (path to ant install folder), JC_HOME_TOOLS and JC_HOME_SIMULATOR (path to JCDK install folder) as environment variables.
    2. Navigate to the JC_HOME_SIMULATOR\samples\reference_apps\PurseWithLoyalty\JavaPurseExtCap\applet directory.
    3. Enter the following command at the command prompt:

      ant all

      In this sample's applet directory, the ant all command executes the APDU script and generates the output file. The ant script names the output file either default.out or a 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 javapurse.expected.ouput file.