We will run the ObjectDeletion sample without the APDU console.
Start Eclipse. Sample_Platform and Sample_Device must already be created.
- Import the
ObjectDeletion
Java Card project into your workspace. If the build doesn't start automatically, start it manually.
The build creates apdu_scripts
and deliverables
directories.
- In Java Card View, double-click on Sample_Device. In the Properties for Sample_Device dialog, select the CREF tab:
- In the Combined (input and output) file for EEPROM data field, type a file name to be used for saving EEPROM between simulator sessions, e.g., ObjectDeletion.eeprom. The file will be automatically created in the bin directory. Later, after the sample run, you can safely delete it.
- Select the Do not open APDU console check box.
- Click OK.
- In the Package Explorer, expand the
apdu_scripts
folder, and execute the following scripts, in order.
cap-com.sun.jcclassic.samples.odsample.libPackageC.script
cap-com.sun.jcclassic.samples.odsample.packageA.script
cap-com.sun.jcclassic.samples.odsample.packageB.script
To run each script:
-
Start the simulator: from the Java Card View, right-click on Sample_Device and select Start.
-
Right-click on the script file and select Java Card and Execute Script
You see the simulator output in the Console view. The simulator stops after each script run.
- Execute these scripts, also in the
apdu_scripts
folder, starting the Sample_Device each time as described in the last step:
od1-1.scr
od1-2.scr
od1-3.scr
od2.scr
od2-2.scr
od3.scr
od3–2.cr
You see the simulator output in the Console view. The simulator stops after each script run. Compare the output in the Console view with the corresponding expected.out
file.