Running the Channels Sample in Eclipse

We will run the Channels sample without the APDU console.

Start Eclipse. Sample_Platform and Sample_Device must already be created.
  1. Import the Channels 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., Channels.eeprom. The file will be automatically created in the bin directory. Later, after the sample run, you can safely delete it.
    2. Select Do not open APDU console.
    3. Click OK.
  3. In the Java Card View, right-click on Sample_Device and select Start.
    The simulator starts and you can see the output in the Console view.
  4. In the Package Explorer window, expand the apdu_scripts folder, right-click on cap-com.sun.jcclassic.samples.channels.script, and select Java Card and Execute Script.
    You see the simulator output in the Console view. The simulator is stopped.
  5. Right-click on Sample_Device and select Start.
    The simulator starts and you can see the output in the Console view. This time the simulator restores EEPROM data from the Channels.eeprom file saved in the previous session.
  6. In the Package Explorer window, in the apdu_scripts folder, right-click on channel.scr, and select Java Card and Execute Script.
    You see the simulator output in the Console view and the simulator stopped. Compare the output in the Console view with the contents of the Channels.expected.output file.