Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JNI for native DLL

Thread Tools

JNI for native DLL

peru0002 peru0002 is offline
Junior Member
Join Date: Oct 2010
Posts: 1
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?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
JNI thread vs. native thread vs. JNI call bgabrhelik Java 0 09-29-2009 03:33 PM
Second long argument to a JNI call on a Win32 DLL contains zero when it reaches the DLL pcarr01 Java 3 02-17-2005 09:30 AM
Re: JNI: Error loading DLL from JNI DDL vasanth Java 0 01-25-2005 11:03 AM
Re: JNI: Error loading DLL from JNI DDL vasanth Java 0 01-25-2005 11:01 AM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM