I am trying to load an applet which utilizes the javacardx.framework.math.BigNumber class. When I attempt to load the generated cap file onto the card, I encounter the following result:
Applet loading failed. Are you sure the CAP file (JC version, packages) is compatible with your card?
pro.javacard.gp.GPException: LOAD failed SW: 6985
at pro.javacard.gp.GPException.check(GPException.java:66)
at pro.javacard.gp.GlobalPlatform.loadCapFile(GlobalPlatform.java:598)
at pro.javacard.gp.GlobalPlatform.loadCapFile(GlobalPlatform.java:556)
at pro.javacard.gp.GPTool.main(GPTool.java:503)
If I remove the references to the BigNumber API, the applet can be loaded onto the card. The reference is a simple call to the BigNumber constructor. BigNumber counter = new BigNumber((short) 4);
I am using JCDK 2.2.2. My card information is as follows:
***** CARD DATA
GlobalPlatform card
Version: 2.1.1
TAG3: 1.2.840.114283.3
SCP version: SCP_01_05
TAG5: 1.3.656.840.100.2.1.3
TAG6: 1.3.6.1.4.1.42.2.110.1.2
I have java 7 install locally and I build my javacard applet using the following line: javac -g -d classes -source 1.5 -target 1.5 -classpath $JC_HOME/lib/api_16.jar src/applet/*.java
. I am using the GlobalPlatformPro to install my cap files.
Has anyone experienced this before?