I just downloaded Tess4J from http://tess4j.sourceforge.net/ and imported it in netbeans. I am follwoing this url i followed every step properly but when i am trying to execute i am getting below error.
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.util.LoadLibs.getTessAPIInstance(LoadLibs.java:75)
at net.sourceforge.tess4j.TessAPI.<clinit>(TessAPI.java:42)
at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:367)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:280)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:212)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:196)
at recognizer.Recognizer.main(Recognizer.java:17)
Java Result: 1
I searched and found that people are suggesting to update to Visual Visual C++ Redistributable Packages for Visual Studio 2013 which i did but it turned out no help, i am still getting the same issue. I don't know what am i doing wrong below is my code.
Code:
import java.io.*;
import net.sourceforge.tess4j.*;
public class Recognizer {
public static void main(String[] args) {
File imageFile = new File("image.jpg");
Tesseract instance = new Tesseract();//
try {
String result = instance.doOCR(imageFile);
System.out.println(result);
} catch (TesseractException e) {
System.err.println(e.getMessage());
}
}
}