title: Python NLTK: Stanford NER tagger error message: NLTK was unable to find the java file
body: <p>Trying to get Stanford NER working with Python. Followed some instructions on the web, but got the error message: "NLTK was unable to find the java file!
  Use software specific configuration paramaters or set the JAVAHOME environment variable." What was wrong? Thank you! </p>
  
  <pre><code>from nltk.tag.stanford import StanfordNERTagger
  from nltk.tokenize import word_tokenize
  
  model = r'C:\Stanford\NER\classifiers\english.muc.7class.distsim.crf.ser.gz'
  jar = r'C:\Stanford\NER\stanford-ner-3.9.1.jar'
  
  ner_tagger = StanfordNERTagger(model, jar, encoding = 'utf-8')
  
  text = 'While in France, Christine Lagarde discussed short-term stimulus ' \
         'efforts in a recent interview with the Wall Street Journal.'
  
  words = word_tokenize(text)
  classified_words = ner_tagger.tag(words)
  </code></pre>