I am running tika on my Linux server, and I want to run it using python (subprocess.Popen)
However, I have a non-root access, so I only have a local java installation. Every time I need to set the java home and path for each session :
export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin
Then I can run tika from the java directory and save the output to some file out_txt.txt
curl www.vit.org/downloads/doc/tariff.doc | java -jar tika-app-1.3.jar --text >out_txt.txt
So, I need to know how to use Popen to:
- set the java home and path using Popen
- write Tika output to the file
out_txt.txt