1

I am using JCard sim, java card version 2.2.2 and I want to know how the .scr file is associated with the .java file. (the java card simulator on NetBeans IDE. I am not using an actual smartcard).

If someone can provide me with some useful links on how these two files are related, I would greatly appreciate it. I have looked through the following links, but they were not specifically helpful in illustrating how I can modify the .scr file in association with my .java file

C H A P T E R 5 - Converting Java Class Files

How to write a Java Card applet: A developer's guide - JavaWorld

Basically what I am trying to do is create a test applet (without the need of .scr files to send and receive APDUs by my other files) - I want to be able to read APDU which contains the the parameters for a function in my process method - That function will then create another APDU as its output, which another function will read as one of it's parameters

As far as I understand, the .scr file is used to send command APDUs that is read by the applet, but there is no way to write to the .scr file. How can I create my own .java test file that sends and receives APDUs instead of relying on the .scr? I can provide more details of what my code looks, if absolutely required.

Thanks

4

1 回答 1

0

您可以使用jCardSim 快速入门指南中描述的方法与模拟器进行通信。它还描述了如何使用其中的正确 AID 选择 Applet。继承process(APDU)的方法将使用快速入门指南中描述的方法接收任何 APDU 发送,从 SELECT by NAME APDU ( INS= A4) 开始。之后就是正常的 APDU 处理。

于 2013-07-31T19:07:57.310 回答