- Development Kit User Guide
- Setup, Samples and Tools
- Running the Samples
- Running the reference_apps Samples
- JavaPurseCrypto Sample
- Running the JavaPurseCrypto Sample in Eclipse
Running the JavaPurseCrypto Sample in Eclipse
Start Eclipse. Sample_Platform and Sample_Device must already be created.
- Import the
JavaPurseCrypto
project into your workspace.If the build doesn't start automatically, start it manually. - Select the
JavaPurseCrypto
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. - 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
JavaPurseCrypto
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
- In the Edit Configuration window do the following:
- Enter JavaPurseCrypto in the Name field
- Select the Start simulator checkbox
- Add the following scripts to the listbox:
-
cap-SampleLibrary.script
-
cap-JavaLoyalty.script
-
cap-JavaPurse.script
-
jpcrypto.scr
-
- Click Apply and OK to close the Edit Configuration window.
- Click OK to close the Properties window.
- In the 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 ofjavapursecrypto.expected.output
file.