OutOfMemoryError when running the coreNlp tool
<p>I know there has been already many discussions about this issue on SO but none of them solve my problem. I have a file <code>test.txt</code> and I want to do some sentiment analysis on it. The format of the input file in one sentence per line. And I run the tool with following command:</p>

<pre><code>java  -cp "../*" -mx1g edu.stanford.nlp.sentiment.SentimentPipeline -file test.txt 
</code></pre>

<p>And it began to run and print the content of my file in a strange way. After a while, it throws this error:</p>

<pre><code>Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
</code></pre>

<p>I also tried: </p>

<pre><code>java -Xms1024m -Xmx2048m -cp "../*" -mx1g edu.stanford.nlp.sentiment.SentimentPipeline -file test.txt
</code></pre>

<p>But it still didn't work. 
BTW, I run the tool in command line instead of eclipse. So I think it is not about eclipse.
Could you please help me with this issue? Thanks in advance!</p>