Dear All,
I was trying to set up NLTK using subprogress to call Stanford corenlp on our server, which is a Gentoo system. But when I try to run it, an error occurs as:
which: no java.exe in(/home/user/.ENV/bin:/homes/user/bin/.amd64-linux:/homes/user/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3:/usr/games/bin:.)
But when I try `which java`, it shows as `/usr/bin/java`. and 'whereis java' results in 'java: /usr/bin/java /usr/opt/oracle-jdk-bin-1.7.0.67/bin/java /usr/opt/oracle-jdk-bin-1.8.0.20/bin/java' and
'echo $JAVA_HOME' results in '/etc/java-config-2/current-system-vm
"java-config --list-available-vms": The following VMs are available for generation-2:
1) Oracle JDK 1.7.0.67 [oracle-jdk-bin-1.7]
*) Oracle JDK 1.8.0.20 [oracle-jdk-bin-1.8]'
I used the the same codes on my own laptop with Ubuntu 12.04, with
my own configuration of JAVA, and every thing is just working well.
I am using NERtag by calling the nltk.tag.stanford.NERTagger. All the details of calling java are hidden in that.
Does anyone know how to fix this?
Thanks very much!