I want to add External libraries of Asprise OCR in Eclipse IDE with mac os and want to run a program
2 Answers
Select a project > (menu) Project > Properties > Java Build Path > Libraries > Add External JARs
4 Comments
Hussain
it gives an run time error .................... Exception in thread "main" java.lang.UnsatisfiedLinkError: no AspriseOCR in java.library.path... at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1809).. at java.lang.Runtime.loadLibrary0(Runtime.java:823)... at java.lang.System.loadLibrary(System.java:1045)... at com.asprise.util.ocr.OCR.loadLibrary(OCR.java:247)... at com.asprise.util.ocr.OCR.<init>(OCR.java:56)... at Demo.main(Demo.java:18)...
Thorbjørn Ravn Andersen
You need a native library attached to the jar file. Have a VERY good look on the properties panel for the Jar file.
Hussain
I have added aspriseOcr.jar file in java.library.path..after that..it gives an another error like that..Exception in thread "main"..java.lang.UnsatisfiedLinkError:/Library/Java/Extensions/libAspriseOCR.jnilib: no suitable image found..Didfind:/Library/Java/Extensions/libAspriseOCR.jnilib: mach-o, but wrong architecture..at .........
Hussain
I have given the path of native library ie libAspriseOCR.jnlib
The easiest way will be building your Java project using Maven. You only need to add the following dependency to your pom.xml:
<dependency>
<groupId>com.asprise.ocr</groupId>
<artifactId>java-ocr-api</artifactId>
<version>[15,)</version>
</dependency>
Alternatively, you can manually download the Java OCR library (jar) here.