Simulation Tools in Java Card
Simulation Tools in Java Card
Prior to starting the simulations, right click on the package MyPackage, choose Tools and then Java Card Generate Script. These consequences involuntarily engender APDU necessary to upload, instantiation (installation) and the assortment of the applet on a JavaCard. Monpackage.javacard then contains three scripts:
- Cape download.script: upload applet
- create-MonApplet.script: installation of the applet
- selectmen MonApplet.script: assortment of applet
APDUTOOL: Sending / Receiving APDU
The tool allows JCDK APDUTOOL of exchange APDUs with a real or a JavaCard simulator.
JCWDE: Simulator without conservation status
The simulator does not require JCWDE phase upload code. We just need to install and select our applet to be able to operate it. In the menu JCWDE Eclipse, select Start.
Click the OK button to launch the simulator JCWDE with our applet. The simulator is launched and then waits for a connection. We can then run the tool APDUTOOL. To do this, open a command prompt, run the script setvars.bat (see IV b), then enter apdutool and validate.
Install our applet by copying the contents in the APDU script create-MonApplet.script (except the last statement powerdown):
We see that the card responds "positively" with a status word 0x9000.
Re: Simulation Tools in Java Card
We can then select our applet by copying the content in APDU selectmen MonApplet.script. Again, the card responds "positively" with a status word 0x9000. Our applet is selected and now we can test it. Let's start by asking the counter (INS = 0x02) by sending the APDU follows:
We can see that the meter is currently at 0. We will increment (INS = 0x00). Again interrogate the meter. It is now 1. Initialize now (INS = 0x03) the counter 0x4A. Decrement the counter (INS = 0x01) and look at the result:
0x4A - 1 = 0x49. The result is consistent. We will disconnect the calculator by typing "powerdown;" in apdutool. We can see JCWDE end:
Re: Simulation Tools in Java Card
Hello!!!
I've got a problem, when I click generate script on the Java Card Tools, it just creates 2 files: create applet and select applet, there ise no cap file and the console says:
error: packscid.SCID: unsupported class file format of version 50.0.
conversion completed with 1 errors and 0 warnings.
Where is the problem??