Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I write a program to install an applet to card as JCShell do.

860308May 9 2011 — edited May 11 2011
Hi everyone.
I get trouble with this task, I have read a lot but I can find the solution. I appreciate your help. Below is my obstacles:
I have a .CAP file. If I use IBM JCOP plugin, it has a JCOP shell that can help me upload the CAP file to the card but now my teacher ask me to do that stage by myself. This is the code from the JCOP shell(I make choices to work with the JCOP simulator at first)

cm> /term "Remote|localhost:1743"
/card -a a000000003000000 -c com.ibm.jc.CardManager
ATR: 3BF81300008131FE454A434F5076323431B7
ATR: T=1, FI=1/DI=3 (93clk/etu), N=0, IFSC=254, BWI=4/CWI=5, Hist="JCOPv241"
cm> set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
cm> init-update 255
cm> ext-auth plain
cm> delete -r 6175746865506b67
jcshell: Error code: 6a88 (Reference data not found)
jcshell: Wrong response APDU: 6A88
Ignoring expected error
cm> delete -r 7365727663506b67
jcshell: Error code: 6a88 (Reference data not found)
jcshell: Wrong response APDU: 6A88
Ignoring expected error
cm> upload -b 250 "D:\SmartCards\JavaCard Workspace\JavaCardWorkspace1\Epay\bin\servicesPkg\javacard\servicesPkg.cap"
cm> install -i 45636f7570417070 -q C9#() 7365727663506b67 45636f7570417070
cm> install -i 4543617368417070 -q C9#() 7365727663506b67 4543617368417070
cm> upload -b 250 "D:\SmartCards\JavaCard Workspace\JavaCardWorkspace1\Epay\bin\authenticationPkg\javacard\authenticationPkg.cap"
cm> install -i 4175746865417070 -q C9#() 6175746865506b67 4175746865417070

To do this task, how many step do I have to go to achieve it ? I can trace the APDUs to get exactly what APDUs is being use but there are some command is hidden. I don't know how to implement this task with smartcardio.* or jpcsc package as well. I hope someone can help me solve this problem.

Another problem is that my teacher asks me to implement a java applet that can run on browser to interface with the card but I don't know if it is the best way because now I see this techology is so old. Do you think so and if so, which way is now the best solution as you think ?
Best regards
Chanlee

Edited by: 857305 on May 9, 2011 8:42 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2011
Added on May 9 2011
5 comments
831 views