title: Tess4j : java.lang.UnsatisfiedLinkError: Unable to load library
body: <p>Im using tess4j.jar in my Eclipse project. When i run it on <strong>eclipse</strong> my project is <strong>working fine</strong>, but when i try to run the exported <strong>runnable .jar file</strong> it always fails due to <strong>"java.lang.UnsatisfiedLinkError: Unable to load library  'libtesseract302'"</strong> error.</p>
  
  <p>I tried to fix it with solutions from similar posts but nothing worked.</p>
  
  <ol>
  <li>Located the  'libtesseract302' and 'liblept168.dll' file into a "dll" folder an added it as source folder.</li>
  <li>I´m running java 32bit and confirmed that the dlls are also 32bit dlls.</li>
  </ol>
  
  <p>Error log:</p>
  
  <pre><code>Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError: Unable to load library 'libtesseract302': Can't obtain InputStream for win32-x86/libtesseract302.dll
      at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
      at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
      at com.sun.jna.Library$Handler.&lt;init&gt;(Library.java:147)
      at com.sun.jna.Native.loadLibrary(Native.java:412)
      at com.sun.jna.Native.loadLibrary(Native.java:391)
      at net.sourceforge.tess4j.TessAPI.&lt;clinit&gt;(Unknown Source)
      at net.sourceforge.tess4j.Tesseract.init(Unknown Source)
      at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source)
      at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source)
      at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source)
      at brain.Main.startOCR(Main.java:292)
      at brain.Main.getOcrResult(Main.java:251)
  </code></pre>