Java 卡 framework.exp 未找到

Java Card framework.exp not found

我从 JavaCard Development in JavaCard 2.2.2 on Linux 开始。 Java Class 是用 Java 1.5 构建的,因为它是 JC 2.2.2 的标准。尝试使用以下命令将 class 转换为 CAP 文件时,由于出现以下错误,脚本无法运行。即使给出文件的显式路径 .

sudo ./converter  -out CAP -exportpath /javacard/java_card_kit-2_2_2/api_export_files/javacard/framework/javacard/framework.exp -classdir ~/Documents/work/smartcards/hello_smartcard/out/production/hello_smartcard/ hello_smartcard 0x01:0x01:0x01:0x01:0x01 1.0 

error: export file framework.exp of package javacard.framework not found.

更新

我深入查看了给定的代码,发现错误发生在以下代码行:

JAVA_HOME/bin/java $JFLAGS com.sun.javacard.converter.Converter "$@"

自己找到答案,借助这个:http://www.protectdigitalassets.com/?p=11

创建名为 hello_smartcard.opt

的文件

-out EXP JCA CAP -exportpath /javacard/java_card_kit-2_2_2/api_export_files -classdir /home/florian/Documents/work/smartcards/hello_smartcard/src/ -applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 hello_smartcard hello_smartcard 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0

从配置创建 CAP

/javacard/java_card_kit-2_2_2/bin/converter -config hello_smartcard.opt 

使用 scriptgen 创建 ADPU 命令

/javacard/java_card_kit-2_2_2/bin/scriptgen javacard/hello_smartcard.cap -o javacard/hello_smartcard.gen