title: Getting UnsatisfiedLinkError: no jnilept in java.library.path when I create TessBaseAPI
body: <p>I am new to java cpp and tesseract-ocr. I am stuck with one issue from couple of hours. 
  I am getting <i>UnsatisfiedLinkError: no jnilept in java.library.path</i> when I create TessBaseAPI. Below is the piece of my code.</p>
  
  <pre><code>public static void tesseractForPdf(String filePath) throws Exception {
      BytePointer outText;
  
      TessBaseAPI api = new TessBaseAPI();//getting the UnsatisfiedLinkError exception here.
      // Initialize tesseract-ocr with English, without specifying tessdata path
      if (api.Init(".", "ENG") != 0) {
          System.err.println("Could not initialize tesseract.");
          System.exit(1);
      }
  
      // Open input image with leptonica library
      PIX image = pixRead(filePath);
      api.SetImage(image);
      // Get OCR result
      outText = api.GetUTF8Text();
      String string = outText.getString();
      System.out.println("OCR output:\n" + string);
  
      // Destroy used object and release memory
      api.End();
      outText.deallocate();
      pixDestroy(image);
  }
  </code></pre>
  
  <p>Exception I am getting on TessBaseAPI api = new TessBaseAPI(); line</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnilept in java.library.path
  at java.lang.ClassLoader.loadLibrary(Unknown Source)
  at java.lang.Runtime.loadLibrary0(Unknown Source)
  at java.lang.System.loadLibrary(Unknown Source)
  at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:702)
  at org.bytedeco.javacpp.Loader.load(Loader.java:500)
  at org.bytedeco.javacpp.Loader.load(Loader.java:417)
  at org.bytedeco.javacpp.lept.&lt;clinit&gt;(lept.java:10)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at org.bytedeco.javacpp.Loader.load(Loader.java:472)
  at org.bytedeco.javacpp.Loader.load(Loader.java:417)
  at org.bytedeco.javacpp.tesseract$TessBaseAPI.&lt;clinit&gt;(tesseract.java:3648)
  at om.practiceproblems.BasicTesseractExampleTest.givenTessBaseApi_whenImageOcrd_thenTextDisplayed(BasicTesseractExampleTest.java:35)
  at com.practiceproblems.BasicTesseractExampleTest.main(BasicTesseractExampleTest.java:22)
  Caused by: java.lang.UnsatisfiedLinkError: no liblept in java.library.path
  at java.lang.ClassLoader.loadLibrary(Unknown Source)
  at java.lang.Runtime.loadLibrary0(Unknown Source)
  at java.lang.System.loadLibrary(Unknown Source)
  at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:702)
  at org.bytedeco.javacpp.Loader.load(Loader.java:491)
  ... 9 more
  </code></pre>
  
  <p>I am using java-presets libraries  tesseract-3.04.01-1.2 and leptonica-1.73-1.2.jar with javacpp-1.2.1 in my example.I have windows OS.
      I did see this <a href="https://github.com/bytedeco/javacpp-presets/issues/46" rel="noreferrer">https://github.com/bytedeco/javacpp-presets/issues/46</a> and couple of discussions on SO and github which pointed that this issue is fixed in jacacpp-1.1 itself.But I am using javacpp1.2. <br/>
  I would really appreciate any help in resolving the issue or finding the root cause.</p>