JNI for native DLL

Discussion in 'Java' started by peru0002, Oct 28, 2010.

  1. peru0002

    peru0002

    Joined:
    Oct 28, 2010
    Messages:
    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?

    Regards.
     
    peru0002, Oct 28, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Abhishek Singh

    JVM crashes: Native method, JNI

    Abhishek Singh, Jul 23, 2003, in forum: Java
    Replies:
    2
    Views:
    818
    Nigel Wade
    Jul 23, 2003
  2. vasanth
    Replies:
    0
    Views:
    2,780
    vasanth
    Jan 25, 2005
  3. vasanth
    Replies:
    0
    Views:
    640
    vasanth
    Jan 25, 2005
  4. pcarr01
    Replies:
    3
    Views:
    683
    Gordon Beaton
    Feb 17, 2005
  5. bgabrhelik
    Replies:
    0
    Views:
    893
    bgabrhelik
    Sep 29, 2009
Loading...

Share This Page