The DLL needs to be in the search path. http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586%28v=vs.85%29.aspx
Tess4J itself is a NetBeans project. Expand the Test Packages, right-click on a unit test file, and select Test File command. On Wednesday, December 18, 2013 10:30:06 AM UTC-6, Koey wrote: > > I don't know what i should do then. > Should I put libtesseract302.dll in win32-x86-64? > > zdenop於 2013年12月18日星期三UTC+8下午9時53分42秒寫道: >> >> Well I have no java experience, but the message is clear (even for me ;-) >> ): >> >> Native library (win32-x86-64/libtesseract302.dll) not found in resource >> path >> >> Zdenko >> >> >> On Wed, Dec 18, 2013 at 12:21 PM, Koey <[email protected]> wrote: >> >>> I am a beginner of using library in java. >>> When I follow the instructions on >>> http://tess4j.sourceforge.net/codesample.html , I cannot create a >>> simple java programme. >>> Also, the NetBean appears the following messages, is there any wrong? >>> >>> run: >>> java.io.IOException: Stream closed >>> at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:151) >>> at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) >>> at java.io.BufferedInputStream.read1(BufferedInputStream.java:275) >>> at java.io.BufferedInputStream.read(BufferedInputStream.java:334) >>> at java.io.FilterInputStream.read(FilterInputStream.java:107) >>> at net.sourceforge.tess4j.example.loadDLL(example.java:50) >>> at net.sourceforge.tess4j.example.main(example.java:20) >>> java.io.IOException: Stream closed >>> at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:151) >>> at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) >>> at java.io.BufferedInputStream.read1(BufferedInputStream.java:275) >>> at java.io.BufferedInputStream.read(BufferedInputStream.java:334) >>> at java.io.FilterInputStream.read(FilterInputStream.java:107) >>> at net.sourceforge.tess4j.example.loadDLL(example.java:50) >>> at net.sourceforge.tess4j.example.main(example.java:21) >>> Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to >>> load library 'libtesseract302': Native library >>> (win32-x86-64/libtesseract302.dll) not found in resource path >>> ([file:/C:/Users/YEE/Desktop/Tess4J-1.2-src%20(1)/Tess4J/lib/jna.jar, >>> file:/C:/Users/YEE/Desktop/Tess4J-1.2-src%20(1)/Tess4J/lib/jai_imageio.jar, >>> file:/C:/Users/YEE/Desktop/Tess4J-1.2-src%20(1)/Tess4J/lib/ghost4j-0.3.1.jar, >>> >>> file:/C:/Users/YEE/Desktop/Tess4J-1.2-src%20(1)/Tess4J/build/classes/]) >>> at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271) >>> at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398) >>> at com.sun.jna.Library$Handler.<init>(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.<clinit>(TessAPI.java:38) >>> at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:286) >>> at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:222) >>> at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:173) >>> at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:158) >>> at net.sourceforge.tess4j.example.main(example.java:28) >>> Java Result: 1 >>> BUILD SUCCESSFUL (total time: 0 seconds) >>> >>> -- >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "tesseract-ocr" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/tesseract-ocr?hl=en >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "tesseract-ocr" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en --- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

