0

java.lang.OutOfMemoryError: Java heap space is resolved by increasing the Xmx3G, but now I am getting "Error occurred during initialization of VM. Could not reserve enough space for object heap. What should I do?

I am trying to execute this

bin\mallet train-classifier --trainer MaxEnt --input train.mallet --output-classifier train.classifier

My train.csv was around 6MB and I changed it to train.mallet file (15MB) by using

bin\mallet import-file --input train.csv --output train.mallet --keep-sequence --remove-stopwords

P.S. I have made changes in both bin/mallet and mallet.bash files to make these changes Xmx3G

  • check this https://stackoverflow.com/a/4401410/2137378 – Amin Heydari Alashti Oct 28 '19 at 18:19
  • I have already tried everything. If I am reducing the size of -Xmx to 1322m or anything less than that, I am getting a **java.lang.OutOfMemoryError: Java heap space** and If I am increasing it to 1323m or more than that, I am getting a **Error occurred during initialization of VM. Could not reserve enough space for 1355776KB object heap** Really stuck at this point. – sagarjain1991 Oct 28 '19 at 18:55

0 Answers0