I am trying to get a simple native call to work. This is under FreeBSD, but the general concept is the same on any platform (replace your concept of shared libraries with your appropriate platform.)
If you want to help, please download my code, which is located temporarily here.
At first I hadn't set my library path, and got an error to that effect. I solved that problem. Now I set my library path to include the directory where the shared library is. But it is still unable to find the native method definition for the method "public native void pooBah()". The complete error message is:
<PRE>Exception in thread "main" java.lang.UnsatisfiedLinkError: pooBah
at JNITest.main(JNITest.java:10)
</PRE>
and that's all.
I think it may be something to do with package names or the method name. For some reason it can't find the method name specified. I don't know why. Can someone please help me? I've searched for similar problems and I can't think of anything I've overlooked.
I am using JDK 1.3.1.
Thanks
Geoffrey
------------------
Sun Certified Programmer for the Java 2 Platform
[This message has been edited by Geoffrey Falk (edited November 16, 2001).]
If you want to help, please download my code, which is located temporarily here.
At first I hadn't set my library path, and got an error to that effect. I solved that problem. Now I set my library path to include the directory where the shared library is. But it is still unable to find the native method definition for the method "public native void pooBah()". The complete error message is:
<PRE>Exception in thread "main" java.lang.UnsatisfiedLinkError: pooBah
at JNITest.main(JNITest.java:10)
</PRE>
and that's all.
I think it may be something to do with package names or the method name. For some reason it can't find the method name specified. I don't know why. Can someone please help me? I've searched for similar problems and I can't think of anything I've overlooked.
I am using JDK 1.3.1.
Thanks
Geoffrey
------------------
Sun Certified Programmer for the Java 2 Platform
[This message has been edited by Geoffrey Falk (edited November 16, 2001).]