I am using NLTK's nltk.tag.stanford, which needs to call the java executable.
I set JAVAHOME to C:\Program Files\Java\jdk1.6.0_25 where my jdk is installed, but when run the program I get the error
"NLTK was unable to find the java executable! Use the config_java() or set the JAVAHOME variable"
Then I spent 3 hours on debugging it and tried
config_java("C:/Program Files/Java/jdk1.6.0_25/") config_java("C:/Program Files/Java/jdk1.6.0_25/bin/") and those without the ending "/".
However the nltk still cannot find it.
Anyone has idea about what's going wrong? Thanks a loooot!
If setting the JAVA_HOME environment doesn't help you, try this:
config_java()
did not work for me. I add the following lines to my code and it worked:
import os java_path = "C:/Program Files/Java/jdk1.7.0_11/bin/java.exe" os.environ['JAVAHOME'] = java_path
I am running Windows 7 64-bit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With