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.
- Import the
SignatureMessageRecovery
project into your workspace. If the build doesn't start automatically, start it manually. - In Java Card View, double-click on Sample_Device. In the Properties for Sample_Device dialog, select the CREF tab:
- Select Do not open APDU console.
- Click OK.
- Now create the first Run Configuration for this project. In the top menu, select Run and Run Configurations...
- In the Run Configurations dialog:
- Right-click on Java Card Project Run and select New.
- In the Name field, enter SignatureMessageRecovery_PartRec
- Click Browse..., select the
SignatureMessageRecovery
project, and click OK. - Select Start simulator.
- In the Scripts to be executed on simulator list box, add the following scripts:
cap-com.sun.jcclassic.samples.signaturemessagerecovery.script
fromsamples\classic_applets\SignatureMessageRecovery\applet\apdu-scripts
sigMsgPartRec.scr
from the same directory.
- Click Apply and Close
- Create the second Run Configuration for this project. In the top menu, select Run and Run Configurations...
- In the Run Configurations dialog:
- Right-click on Java Card Project Run and select New.
- In the Name field, enter SignatureMessageRecovery_FullRec
- Click Browse..., select the
SignatureMessageRecovery
project, and click OK. - Select Start simulator.
- In the Scripts to be executed on simulator list box, add the following scripts:
cap-com.sun.jcclassic.samples.signaturemessagerecovery.script
fromsamples\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)
- Click Apply and Close
- 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. - 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.