Reputation: 341
I want to test tess4j to do OCR. I used the following tutorial for a first example: http://tess4j.sourceforge.net/codesample.html I included the required libraries, but I am getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at net.sourceforge.tess4j.Tesseract.<clinit>(Unknown Source)
at tess4jexample.TesseractExample.main(TesseractExample.java:10)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
Does anyone knows a solution for this?
Upvotes: 2
Views: 3173
Reputation: 341
There has where still some dependencies missing, which have not been mentioned on the mavenrepository:
I think now it is working :-) Thank you nguyenq for this hint, to check the dependencies.
Upvotes: 1
Reputation: 8345
Tess4J has several dependencies. You'll need to include them in the classpath.
Upvotes: 2