org.xvolks.jnative.exceptions.NativeException: Function add not found
at org.xvolks.jnative.JNative.nLoadLibrary(Native Method)
at org.xvolks.jnative.JNative.<init>(JNative.java:348)
at org.xvolks.jnative.JNative.<init>(JNative.java:269)
at NewTest.main(NewTest.java:13)
JNativeCpp.dll放在对应的位置了,可以确定的是调用的库中存在该函数,请高手指教
附代码:
import org.xvolks.jnative.JNative;
import org.xvolks.jnative.Type;
import org.xvolks.jnative.exceptions.NativeException;
public class NewTest
{
public static void main(String[] args) throws NativeException, IllegalAccessException
{
JNative n = null;
try
{
//System.loadLibrary("jnative");
n = new JNative("jnative.dll", "add");
n.setRetVal(Type.INT);
n.setParameter(0 ,1) ;
n.setParameter(1, 2);
n.invoke();
System.out.println(n.getDLLName());
}
catch(Exception e)
{
e.printStackTrace();
}
finally
{
if(n!=null)
n.dispose();
}
}
}
慕盖茨4494581
叮当猫咪
相关分类