Where can I find this native library. I am using MacOS and have an Java Card Applet that loads fine using the new Simulator for APDU driving but when I come across usage of this class.
javacard.framework.Util.arrayFill
I get a link error at runtime. Yes, I am very familiar with JNI and have written plenty of native. Maybe someone can point me to the correct JAR though I do have the correct one.
A simple example below is provided and run
[Compile]
javac -cp .:jcardsim-3.0.5-20221215.062536-4.jar TestUtil.java
[Run]
java -cp .:jcardsim-3.0.5-20221215.062536-4.jar TestUtil
here
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'short javacard.framework.Util.arrayFill(byte[], short, short, byte)'
at javacard.framework.Util.arrayFill(Native Method)
at TestUtil.main(TestUtil.java:12)
/****
javac -cp .:jcardsim-3.0.5-20221215.062536-4.jar TestUtil.java
java -cp .:jcardsim-3.0.5-20221215.062536-4.jar TestUtil
****/
import javacard.framework.Util;
public class TestUtil {
public static void main(String[] args) throws Exception {
System.out.println("here");
byte[] wrkBuff0 = new byte[100];
short loffset = Util.arrayFill(wrkBuff0, (short)0, (short) 32, (byte) 0xFF);
System.out.println("here2");
}
}