JNI for native DLL

Joined
Oct 28, 2010
Messages
1
Reaction score
0
Hi All,

I am developing through which I need to call some functions from the native DLL.

Currently, I started an Visual Studio project and an writing an DLL application. Firstly I created a java file and declared the functions there and did a System.loadLibrary(native DLL) there. Then I compiled it using javac and created the jni header file.

Inside my visual studio project I have the native lib's header file, the newly created jni header file, and I wrote a .cpp file within which for each JNI function I mapped the corresponding functions from the native library. After compiling I have the new DLL.

Now how do I use this in my java app to call the relevant function? I just did a System.loadLibrary(new DLL) there. But how do I call the functions there?

I am getting UnsatisfiedLinkError (native method) error? How do I resolve it?

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top