开发者

Setting environment variable TESSDATA_PREFIX in Tomcat

We are using Tesseract OCR Java library called Tess4J. 开发者_开发知识库It works fine if run as a standalone application. It needs a variable called TESSDATA_PREFIX which contains the tessdata config and other charset related files.

It also runs fine with embedded Tomcat 6 server in eclipse. I had set TESSDATA_PREFIX as an environment variable by using the launch configuration.

But when I package everything into a WAR and drop it in deploy directory of tomcat, the environment variable does not seem to be picked and the server crashes the moment it encounters the doOCR api( which needs the tessdata config).

I tried setting this env variable inside catalina.bat and also thru command line, but no luck.


Environment variables in Tomcat should be put into a setenv.bat/setenv.sh script in the bin directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜