Running the ObjectDeletion Sample in Eclipse

Run the ObjectDeletion sample without the APDU console.

Start Eclipse. Sample_Platform and Sample_Device must already be created.
  1. 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.

  2. In Java Card View, double-click on Sample_Device. In the Properties for Sample_Device dialog, select the CREF tab:
    1. 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.
    2. Select the Do not open APDU console check box.
    3. Click OK.
  3. At the command line, browse to the JC_HOME_SIMULATOR\samples\classic_applets\ObjectDeletion\applet folder.
    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. Build the ObjectDeletion sample and run ant in the JC_HOME_SIMULATOR\samples\classic_applets\ObjectDeletion\applet folder.

      A build folder is created with the applet*.scr files.

    3. In Eclipse, right-click on the ObjectDeletion project and click Refresh.

      The build folder is added into the project.

  4. Execute the following scripts in the same order from the build folder.
    • applet1-1.scr
    • applet1-2.scr
    • applet1-3.scr
    • applet2.scr
    • applet2-2.scr
    • applet3.scr
    • applet3-2.scr
    1. To run each script, start the simulator, from the Java Card View, right-click on Sample_Device and select Start.
    2. 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. Compare the output in the Console view with the corresponding expected.out file. Compare the output in the Console view for each run of an applet*.scr file, with the corresponding od*.expected.out file, located in the JC_HOME_SIMULATOR\samples\classic_applets\ObjectDeletion folder.