I have a two line code in Rational Functional Tester script which is calling a method defined in a dll (created for jni call). But I am getting error: [java.lang.UnsatisfiedLinkError] - com/JniSleep.jniWait()V.].
import resources.Script1Helper;
import com.JniClass;
public class Script1 extends Script1Helper {
static {
System.load("C:/VisualStudioProject/JniClass/Debug/JniClass.dll");
}
public void testMain(Object[] args)
{
JniClass jniClass = new JniClass();
jniClass.jniWait(); //error thrown here
}
}
If I run the same piece of code in a normal java class (not RFT script), in the same RFT project, it works like a charm (code below).
import com.JniClass;
public class testTimer {
/**
* @param args
*/
// TODO Auto-generated method stub
static {
System.load("C:/VisualStudioProject/JniClass/Debug/JniClass.dll");
}
public static void main(String[] args) {
JniClass jniClass = new JniClass();
jniClass.jniWait();
}
}
Why is the code not working in RFT script ? I have tried setting the ddl in Native library setting too but that did not help. Can anyone please help.