Documentation



Java Card 3 Platform Development Kit User Guide, Classic Edition

Running the Service Sample in Eclipse

We will run this sample using Run Configuration and the APDU console in Eclipse.

Start Eclipse. Sample_Platform and Sample_Device must already be created.
  1. Import the Service 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. Clear the Input file with EEPROM data, the Output file for EEPROM data, and the Combined (input and output) file for EEPROM data fields.
    2. Clear Do not open APDU console.
    3. Click OK.
  3. 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 Service
    3. Click Browse..., select the Service project, and click OK.
    4. Select Start simulator.
    5. In the Scripts to be executed on simulator list box, add the following scripts:
      • Browse to the JC_CLASSIC_HOME\samples\classic_applets\Service\applet\apdu-scripts directory and choose cap-com.sun.jcclassic.samples.service.script

      • From the same directory, select service.scr

    6. Click Run
    The simulator starts and executes the scripts in the list box, and you can see the output in the Console view.

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

Close Window

Table of Contents

Java Card: 3 Platform Development Kit User Guide, Classic Edition

Expand | Collapse