我从Linux2.2.2中的JavaCard开发开始。Java类是用Java1.5构建的,因为它是JC2.2.2的标准。当尝试使用以下命令将类转换为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 错误:未找到软件包framework.exp的导出文件javacard.framework。
更新
我深入研究了给定的代码,发现错误发生在以下代码行:
JAVA_HOME/bin/java $JFLAGS com.sun.javacard.converter.Converter "$@"发布于 2017-02-24 13:49:55
在这个帮助下,我自己找到答案:http://www.protectdigitalassets.com/?p=11
创建名为hello_smartcard.opt的文件
/javacard/java_card_kit-2_2_2/api_export_files /home/florian/Documents/work/smartcards/hello_smartcard/src/ -classdir -applet 0xa0:0x0:0x0:0x0:0x0:0x3:0x1:0xc:0x1:0x1 hello_smartcard hello_smartcard 0:0x0:0x0:0x0:0x62:0x3:0xc:0x1 1.0
从配置创建CAP
/javacard/java_card_kit-2_2_2/bin/converter -config hello_smartcard.opt 使用scriptgen创建命令
/javacard/java_card_kit-2_2_2/bin/scriptgen javacard/hello_smartcard.cap -o javacard/hello_smartcard.genhttps://stackoverflow.com/questions/42433783
复制相似问题