title: OpenCV + Java = UnsatisfiedLinkError
body: <p>I need capture a video stream from my USB webcam, for this i use Opencv 2.4.6 for developing in Java. I follow the steps listed in <a href="http://docs.opencv.org/doc/tutorials/introduction/desktop_java/java_dev_intro.html#java-project-in-eclipse">here</a></p>
  
  <p>I add the "C:\opencv\build\java\x64" dir to my System PATH and include the "opencv-246.jar" file into my libraries on ECLIPSE. When y run the explame </p>
  
  <pre><code>import org.opencv.core.Core;
  import org.opencv.core.CvType;
  import org.opencv.core.Mat;
  
  public class Main {
      public static void main(String[] args) {
          System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
          Mat m  = Mat.eye(3, 3, CvType.CV_8UC1);
          System.out.println("m = " + m.dump());
      }
  }
  </code></pre>
  
  <p>i get </p>
  
  <pre><code>m = [1, 0, 0;
    0, 1, 0;
    0, 0, 1]
  </code></pre>
  
  <p>OK =)</p>
  
  <p>but when i run </p>
  
  <pre><code>import org.opencv.highgui.VideoCapture;
  
  public class Main {
      public static void main(String[] args) {
          VideoCapture vc = new VideoCapture(0);
          if(vc.isOpened()){
              System.out.println("Works!");
          }
      }
  }
  </code></pre>
  
  <p>i get </p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.n_VideoCapture(I)J
      at org.opencv.highgui.VideoCapture.n_VideoCapture(Native Method)
      at org.opencv.highgui.VideoCapture.&lt;init&gt;(VideoCapture.java:113)
      at Main.main(Main.java:5)
  </code></pre>
  
  <p>i add all the routes containes in:</p>
  
  <blockquote>
    <p>C:\opencv\build\x64\vc10</p>
  </blockquote>
  
  <p>one by one,but doesn`t work.</p>
  
  <p>Finally i create a variable called OPENCV_DIR with C:\opencv\build\x64\vc10 but still getting UnsatisfiedLinkError.</p>
  
  <p>PLEASE HELP ME!</p>