Running the RMIPurse Sample from the Command Line

To run the RMIPurse sample:

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

    1. Navigate to the JC_HOME_SIMULATOR\bin directory.

    2. Start the simulator by typing the following command at the command prompt:

      cref -o demoee

    Starting the simulator with the -o option and filename causes the simulator to save the EEPROM contents to a file named demoee.

  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\classic_applets\RMIPurse\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 installs the RMI application.

  3. In the cref Command Prompt window, restart the simulator by using the following command:

    cref -i demoee

    Starting the simulator with the -i option and filename causes the simulator to use the contents of the demoee file to initialize the EEPROM.

  4. In the applet Command Prompt window, perform the following:

    1. Navigate to the JC_HOME_SIMULATOR\samples\classic_applets\RMIPurse\client directory.

    2. Enter the following command at the command prompt:

      ant all

      In this sample's client directory, the ant all command executes the APDU script and generates the rmidemo.actual.output file.

  5. Verify that the contents of the rmidemo.actual.output file in the client directory are the same as the contents of the rmidemo.expected.output file in the RMIPurse directory.