I have written a class called A(for ex)containing a native method inside a package called B(for ex). I have compiled it by ---c:B>javac A.java.Then I generated a header file just by running---c:B>javah -jni A.Is this the way for creating header file.Why because when I tried to run the code I got UnsatisfiedLinkError.
The next most common problem is that people forget to specify the library path on which the JVM will try to locate native libraries. Use the -Djava.library.path= option for that purpose.
The next most common problem is that people forget to actually load the library in Java.