I was trying to use a .NET DLL from Java code, the tsMemberFunctions.DLL is loaded successfully, but the code fails to call the actual function.
See the snippet below:
public class tsMemberFunctions {
public native void GetMemberJSONSample();
static {
System.loadLibrary("tsMemberFunctions");
System.out.println("Loaded");
}
public static void main(String[] args) {
new tsMemberFunctions().GetMemberJSONSample();
}
}
On executing above method I am getting below error:
Loaded
Exception in thread "main" java.lang.UnsatisfiedLinkError: tsMemberFunctions.GetMemberJSONSample()V
at tsMemberFunctions.GetMemberJSONSample(Native Method)
at tsMemberFunctions.main(tsMemberFunctions.java:12)
Can someone please tell me if I missed anything or anything is incorrect in the code or suggest better alternative for this use case. TIA.