I have this problem in my web application in Tomcat 9:
Error opening data file ./tessdata/eng.traineddata Please make sure the TESSDATAPREFIX environment variable is set to the parent directory of your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages!
I create folder C:\Tess4J from Tess4J 3.0.4 zip, with subfolders:
- dist
- tess4j-3.0.jar
- lib
- LIBS
- nbproject
- src
- tessdata
- Downloaded ZIP with languages and extracted here
- test
In catalina.properties i add:
- C:/Tess4J/dist/tess4j-3.0.jar,C:/Tess4J/lib
In environments i try to add both, and doesn't work:
- TESSDATA_PREFIX --> C:/Tess4J
- TESSDATA_PREFIX --> C:/Tess4J/tessdata
Then i invoke my servlet whit doOCR method, and i've got error.
May you help me please?