Hi All,
I am having a similar issue.
Basically I am able to test Tess4j (below code) using 32 bit JVM with 32
bit dll's (libtesseract302.dll, liblept168.dll) on my windows 7 m/c in
Eclipse. However now when I trying to run the same code using 64 bit JVM
and 64 bit dll's (downloaded from Tesseract .NET wrapper project.) I am
getting error pasted below.
*package ocr;*
*import java.io.*;import net.sourceforge.tess4j.*; public class example {*
* public static void main(String[] args) { File imageFile = new
File("c:/temp/IMG123.tif"); Tesseract instance = Tesseract.getInstance();
// try { String result =
instance.doOCR(imageFile); System.out.println(result); } catch
(TesseractException e) { System.err.println(e.getMessage()); } } }*
*ECLIPSE ERROR*
*Exception in thread "main" java.lang.UnsatisfiedLinkError: The specified
module could not be found.*
* at com.sun.jna.Native.open(Native Method) at
com.sun.jna.Native.open(Native.java:1759) at
com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:260) 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:293) at
net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:227) at
net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:176) at
net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:159) at
ocr.example.main(example.java:15)*
When I click on the error, it is taking me to the following code in the
TessAPI.java
static final String *LIB_NAME* = "libtesseract302";
public static final String *LIB_NAME_NON_WIN* = "tesseract";
/**
* An instance of the class library.
*/
*Public static final TessAPI INSTANCE = (TessAPI)
Native.loadLibrary(WINDOWS ? LIB_NAME : LIB_NAME_NON_WIN, TessAPI.class);*
Can someone please share some pointers how to solve this problem.
Thanks in advance
Regards,
Geetanjali
=========================================================================================
On Friday, January 18, 2013 7:41:56 PM UTC+5:30, Deniz Atak wrote:
> Hi,
>
> I am trying to run Tess4J in 64 JVM from Netbeans IDE and getting this
> error:
> Testcase: testTessBaseAPIRect(net.sourceforge.tess4j.TessAPI1Test):
> Caused an ERROR
> Unable to load library 'libtesseract302': The specified module could not
> be found.
>
> java.lang.UnsatisfiedLinkError: Unable to load library 'libtesseract302':
> The specified module could not be found.
>
> at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:169)
> at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:242)
> at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:205)
> at com.sun.jna.Native.register(Native.java:1033)
> at net.sourceforge.tess4j.TessAPI1.<clinit>(TessAPI1.java:37)
> at
> net.sourceforge.tess4j.TessAPI1Test.testTessBaseAPIRect(TessAPI1Test.java:72)
>
>
> As far as I searched, I think this error message is because of the JVM.
> But I am not sure. The .dll file is in the project folder, but it seems JVM
> can not find it..Can anyone recommend a link to run Tess4J test from
> scratch?
>
--
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].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/eab1ddfd-924e-4958-ac41-86024f85122e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.