title: Stanford-NLP: Could not find main class error
body: <p>This question seems to have been answered a few times (<a href="https://stackoverflow.com/questions/18093928/what-does-could-not-find-or-load-main-class-mean">What does &quot;Could not find or load main class&quot; mean?</a> and <a href="https://stackoverflow.com/a/16208709/2771315">https://stackoverflow.com/a/16208709/2771315</a>) but for some reason none of the shared methods are working.</p>
  
  <p>What I've done so far.</p>
  
  <p>1) Navigated to the directory containing the CoreNLP source files in terminal: <code>~/Downloads/CoreNLP-master/src</code></p>
  
  <p>2) Selected one of the packages as a test case e.g. executed the command <code>java -cp "*" -mx5g edu.stanford.nlp.sentiment.SentimentPipeline -file foo.txt</code> (as per the docs, <a href="http://nlp.stanford.edu/sentiment/code.html" rel="nofollow noreferrer">http://nlp.stanford.edu/sentiment/code.html</a>)</p>
  
  <p>I've tried variations of the above by altering the classpath <code>-cp</code> condition and setting it using <code>set CLASSPATH = $CLASSPATH=~/Downloads/CoreNLP-master/src</code> but can't seem to get a result. Does anyone know what I'm doing wrong? If I were to hazard a guess, I think that there is something wrong with the classpath but I'm not sure what. </p>