Running the SignatureMessageRecovery Sample in Eclipse

In this sample we create two run configurations for the same project, to run a different pair of scripts.

Start Eclipse. Sample_Platform and Sample_Device must already be created.
  1. Import the SignatureMessageRecovery project into your workspace. If the build doesn't start automatically, start it manually.
  2. In Java Card View, double-click on Sample_Device. In the Properties for Sample_Device dialog, select the CREF tab:
    1. Select Do not open APDU console.
    2. Click OK.
  3. Now create the first Run Configuration for this project. In the top menu, select Run and Run Configurations...
  4. In the Run Configurations dialog:
    1. Right-click on Java Card Project Run and select New.
    2. In the Name field, enter SignatureMessageRecovery_PartRec
    3. Click Browse..., select the SignatureMessageRecovery project, and click OK.
    4. Select Start simulator.
    5. In the Scripts to be executed on simulator list box, add the following scripts:
      • cap-com.sun.jcclassic.samples.signaturemessagerecovery.script from samples\classic_applets\SignatureMessageRecovery\applet\apdu-scripts

      • sigMsgPartRec.scr from the same directory.

    6. Click Apply and Close
  5. Create the second Run Configuration for this project. In the top menu, select Run and Run Configurations...
  6. In the Run Configurations dialog:
    1. Right-click on Java Card Project Run and select New.
    2. In the Name field, enter SignatureMessageRecovery_FullRec
    3. Click Browse..., select the SignatureMessageRecovery project, and click OK.
    4. Select Start simulator.
    5. In the Scripts to be executed on simulator list box, add the following scripts:
      • cap-com.sun.jcclassic.samples.signaturemessagerecovery.script from samples\classic_applets\SignatureMessageRecovery\applet\apdu-scripts

      • sigMsgFullRec.scr from the same directory. (Note that this script is different from the first Run Configuration that you created)

    6. Click Apply and Close
  7. In the top menu, select Run and Run Configurations..., select SignatureMessageRecovery_PartRec, click Run.

    Compare the output with the contents of the sigMsgPartRec.expected.output file.

  8. In the top menu, select Run and Run Configurations..., select SignatureMessageRecovery_FullRec, click Run.

    Compare the output with the contents of the sigMsgFullRec.expected.output file.