I have a java application (Ninja framework) which uses TreeTagger. Root directory of TreeTagger is set via enviroment variable TREETAGGER_HOME. When I run application via ninja, everything works fine, however, when i deploy war file to tomcat, it cannot locate Tree Tagger binary:
java.lang.RuntimeException: java.io.IOException: Unable to locate tree-tagger binary in the following locations [/home/jarino/treetagger/bin/tree-tagger]. Make sure the environment variable 'TREETAGGER_HOME' or 'TAGDIR' or the system property 'treetagger.home' point to the TreeTagger installation directory.
The location which is specified in exception (/home/jarino/treetagger/bin/tree-tagger) is valid - the binary file exists. Why Tomcat application can't see existing file?
I'm guessing you are not running the Tomcat application server as the user jarino, so,
TIP: I can see that a maven package exists for treetagger. Using a dependency manager, will make your life much easier :-)