-
Notifications
You must be signed in to change notification settings - Fork 383
Description
Homebrew on OSX installs Tesseract in /usr/local/Cellar/tesseract/, and it puts symlinks for the libraries in /usr/local/lib. However it doesn't seem like JNI picks up the libraries in this location, with the error "Native library (darwin/libtesseract.dylib) not found in resource path".
I'm using VietOCR, so I temporarily fixed the issue by unpacking the .jar, and copying libtesseract.dylib into a darwin directory within it, and re-zipping it. However I think a better solution would be to use NativeLibrary.addSearchPath() to search for /usr/local/lib, as this is a common way of installing Tesseract on OSX.
I'm not very familiar with Java or OSX (I found this issue while helping someone else), so it's possible that there's a better way to do this, but the above suggested solution is the best I know of.