Hi All,

I am facing one problem on calling the native method from my java code.
Can anyone help me on this how to solve the problem.

My dll is created from C++ code and in my java class its loading properly.But when i am trying to call the native method its throwing exception::

java.lang.UnsatisfiedLinkError: display
    at com.delfigo.jni.JNIInvocation.display(Native Method)
    at com.delfigo.jni.JNIInvocation.main(JNIInvocation.java:26)

and my java class is given below where i am trying to call the native method::

public class JNIInvocation {
    // Native method declaration
    public native int display();

    // Load the DLL from java.path.entry
    static {

     * @param args
    public static void main(String[] args) {
        // Call C++ method
        try {
            JNIInvocation lInvocation = new JNIInvocation();
            int lDisplay = lInvocation.display();
        } catch (Error e) {
Its not able to find the native method declared in the dll .

Can anyone help me on this

Thanks in advance


Last edited by shabbir; 31Mar2009 at 07:17.. Reason: Code blocks