- Development Kit User Guide
- Setup, Samples and Tools
- Running the Samples
- Running the reference_apps Samples
- JavaPurse Sample Application
- Running the JavaPurse Sample in Eclipse
Running the JavaPurse Sample in Eclipse
Start Eclipse. Sample_Platform and Sample_Device must already be created.
- Import the
JavaPurse
project into your workspace.If the build doesn't start automatically, start it manually. - Before you start any script, you must change the PowerDown and PowerUp parameters for generating the script files. Otherwise, the simulator goes into the PowerDown mode or interrupt the execution by throwing error messages. To change the PowerDown parameters:
- In the Package Explorer view, click the
JavaPurse
Java project. - Right-click on the Java Card project and select Java Card and CAP Files Settings.
- Select a CAP file from the list that appears in the Java Card CAP Files page.
- Click SampleLibrary and select Edit.
- In the Edit mode, select Compact CAP File.
- Click Next>.
- Select ScriptGen slide and select the Suppress "PowerDown;" APDU command at the end of CAP script check box.
- Click Finish.
- Click JavaLoyality and select Edit.
- In the Edit mode, select Compact CAP File.
- Click Next>.
- Select ScriptGen slide and select the Supress "PowerUp; APDU command at the beginning of CAP script and Supress "PowerDown; APDU command at the end of CAP script check boxes.
- Click Finish.
- Click JavaPurse and select Edit.
- In the Edit mode, select Compact CAP File.
- Click Next>.
- Select ScriptGen slide and select the Supress "PowerUp; APDU command at the beginning of CAP script and Supress "PowerDown; APDU command at the end of CAP script check boxes.
- Click Finish and select Apply and Close.
- In the Package Explorer view, click the
- In the Package Explorer view, click the
JavaPurse
project and then right-click on the Java Card project and build the project manually. - Select the
JavaPurse
project, press Alt+Enter, select Run/Debug Settings, and click New. In the Select Configuration Type window select Java Card Project Run and click OK. - In the Edit Configuration window do the following:
- Enter JavaPurse in the Name field
- Select the Start simulator check box
- Add the following scripts to the listbox:
-
cap-SampleLibrary.script
-
cap-JavaLoyalty.script
-
cap-JavaPurse.script
-
jp.scr
-
- Click Apply and OK to close the Edit Configuration window.
- Click OK to close the Properties window.
- In Java Card View, double-click Sample_Device. In the Properties for Sample_Device dialog, select the CREF tab:
- Select Do not open APDU console.
- Click OK.
- Select Run and Run Configurations. Select
JavaPurse
then click Run.Compare the console output with the content ofjavapurse.expected.output
file.