title: What is correct Native Library Path to use OpenCV in eclipse-ubuntu
body: <p>I have an issue in setting native library path for opencv in eclipse-ubuntu.i am using ubuntu 15.04.installed opencv 3.1.0 following this link <a href="http://milq.github.io/install-opencv-ubuntu-debian/" rel="noreferrer">http://milq.github.io/install-opencv-ubuntu-debian/</a>
  and add new library(OpenCV) in eclipse and set it's jar path as</p>
  
  <pre><code>/home/user/opencv-3.1.0/build/bin/opencv-310.jar
  </code></pre>
  
  <p>and native library path as</p>
  
  <pre><code>/home/user/opencv-3.1.0/build/lib
  </code></pre>
  
  <p><code>lib</code> folder contains <code>.so</code> and <code>.a</code> files. But when i try to use Mat object it gives me error:here is <strong>Main Method</strong></p>
  
  <pre><code>System.out.println("Welcome to OpenCV hhhh " + Core.VERSION);
  System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
  Mat img=new Mat();
  </code></pre>
  
  <p>and here is screenshot of my code and console
  <a href="https://i.stack.imgur.com/1jlRz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1jlRz.png" alt="enter image description here"></a>
  it gives me error:</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat()J
          at org.opencv.core.Mat.n_Mat(Native Method)
          at org.opencv.core.Mat.&lt;init&gt;(Mat.java:24)
  </code></pre>
  
  <p>if i use mat like this</p>
  
  <pre><code>Mat m1 =Imgcodecs.imread("/home/zed/Desktop/img.png");
  </code></pre>
  
  <p>then it gives me diff error:</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.imgcodecs.Imgcodecs.imread_1(Ljava/lang/String;)J
      at org.opencv.imgcodecs.Imgcodecs.imread_1(Native Method)
      at org.opencv.imgcodecs.Imgcodecs.imread(Imgcodecs.java:102)
  </code></pre>
  
  <p>am i giving right path for native library? If not then what is the right path for Native Library to use Opencv3.1.0 in eclipse-ubuntu</p>