To write a java card host application we need JCK 1.6+ as these releases contains the SmartcardIo API. This API have all the necessary functions which we will need to communicate with a real java smart card.
One drawback of smartCardIo is that it can only communicate with a real smart card and not with a simulator
Below is a simple java card host application. When this application will be executed it will output the world 'Hello World' which we stored in our applet Hello World Applet
Output:
Terminals Found: 1
PC/SC terminal O2Micro CCID SC Reader 0
Card Info: PC/SC card in O2Micro CCID SC Reader 0, protocol T=0, state OK
Select Applet Card Response <== : ResponseAPDU: 2 bytes, SW=9000
Get Hello World Card Response <== : ResponseAPDU: 13 bytes, SW=9000
Hello World
No comments:
Post a Comment