title: Getting Unsatisfied Link error while making a JNI call
body: <p>I get the Unsatisfied link error while calling the JNI method.Below are my logs </p>
  
  <p>Logs </p>
  
  <pre><code> new exception [Handler processing failed; nested exception is java.lang.UnsatisfiedLinkError: demo.JNIWrapper.packet_mining_start(Ljava/lang/String;)I] with root cause
  
  java.lang.UnsatisfiedLinkError: demo.JNIWrapper.packet_mining_start(Ljava/lang/String;)I
      at demo.JNIWrapper.packet_mining_start(Native Method)
      at demo.RESTController.getPcap(RESTController.java:97)
  </code></pre>
  
  <p>Below is my JNI Code</p>
  
  <pre><code>public class JNIWrapper {
  
      static{
  
  
          System.load("/home/XXX/XXX/Library/newJNI/libJNIDemo.so");
  
  
      }
  
  
  
      //Get Path in output param and status
      public native int  packet_mining_start(String fileName);
  }
  </code></pre>
  
  <p>Now This method is called from a file Main.java and while creating the Object for this class (JNIWrapper jni=new JNIWrapper()) during which  the System.load call is made <strong>I dont receive any error .</strong></p>
  
  <p>Now when I call the method packet_mining_start in the JNI I get the error .</p>
  
  <p>My .h file <strong>method</strong>  is (Note not created from the Java class file ) </p>
  
  <pre><code>uint32_t pax_packet_mining_start(uint8_t* mining_query_file_name);
  </code></pre>
  
  <p>This method does not contain JNIExport and JNICall variables or types in it .So if a method which does not contain JNIExport and calling that method will give UnsatisfiedLink error ? </p>
  
  <p>Is it mandatory to have JNICall and JNIExport in the native method ?</p>
  
  <p>How can i integrate this with my normal c file ?</p>