title: Utilizing JNI library: Finding classes
body: <p>I'm trying to use OpenCv in an Eclipse Java project (via javaCv) and I'm getting run-time <code>java.lang.ClassNotFoundExpection</code> and <code>java.lang.NoClassDefFoundError</code> errors. The imports look OK and everything runs fine until execution gets to this line:</p>
  
  <pre><code>IplImage img = cvLoadImage(file.getAbsolutePath());
  </code></pre>
  
  <p>The class loader seems unable to find <code>com.googlecode.javacpp.Pointer</code>.</p>
  
  <p>Here's what I've tried:</p>
  
  <ul>
  <li>I've copied three jar files to `[project_root]\lib`: javacv-windows-x86.jar, javacv.jar and opencv-2.4.4-windows-x86.jar.</li>
  <li>I added all three jars to my build path using Eclipse gui.</li>
  <li>I added `[...]\opencv\build\x86\vc11\bin` to my system path.</li>
  <li>I added the following argument to my Eclipse run configuration: `-Djava.library.path=[...]\opencv\build\x86\vc11\bin\*`</li>
  </ul>
  
  <p>EDIT:
  I was just missing the javacpp jar. I had downloaded javacv-0.4-cppjars from the javacv project and I imported the relevant jar therein (opencv-2.4.4-windows-x86.jar) but I needed to grab <a href="https://code.google.com/p/javacpp/" rel="nofollow">javacpp.jar from a separate google code project</a>.</p>