C
CliffMacGillivray
I am getting an UnsatisfiedLinkError not when I load the library but
rather when I call a native method whose implementation is inside
the dll.
Some code:
package myPackage;
public class Main{
public static void main(String[] args){
System.load("C:development\\myNative.dll");
someObject j=new someObject();
j.someNativeMethod();
}
}
The exception is thrown not on the load but on the method invocation
j.someNativeMethod();
The someObject class is really basic
public class someObject{
public someObject(){
//nothing here yet
}
public native void someNativeMethod();
public void aJavaMethod(){
someNativeMethod();
}
}
Any advice on what could be causing this? I am sure that the native
method is appropriately defined and all that. I have used a tool
to dump out the symbols form the dll and I am sure everything is there.
Oh, and no, these are not the real class and method names. My employer
is really fanatical about any sort of public code release so I
anonymized the source a little to avoid trouble.
rather when I call a native method whose implementation is inside
the dll.
Some code:
package myPackage;
public class Main{
public static void main(String[] args){
System.load("C:development\\myNative.dll");
someObject j=new someObject();
j.someNativeMethod();
}
}
The exception is thrown not on the load but on the method invocation
j.someNativeMethod();
The someObject class is really basic
public class someObject{
public someObject(){
//nothing here yet
}
public native void someNativeMethod();
public void aJavaMethod(){
someNativeMethod();
}
}
Any advice on what could be causing this? I am sure that the native
method is appropriately defined and all that. I have used a tool
to dump out the symbols form the dll and I am sure everything is there.
Oh, and no, these are not the real class and method names. My employer
is really fanatical about any sort of public code release so I
anonymized the source a little to avoid trouble.