Increase heap size in java for weka

screechOwl picture screechOwl · Dec 29, 2011 · Viewed 52.1k times · Source

I'm trying to increase the heap size in java for weka which keeps crashing. I used the suggested line:

> java -Xmx500m -classpath

but I get the following error:

-classpath requires class path specification

I'm not sure what this means. Any suggestions?

Answer

screechOwl picture screechOwl · Mar 11, 2012

What I found was the actual issue was in the file 'RunWeka.ini' in '\Program Files (x86)\Weka-3-6'. I opened it with notepad and in the middle of the file there is a line 'maxheap = 512m'.

I changed the line to read 'maxheap=2000m', saved the file and reloaded weka and this fixed my problems.

I'm not sure if this is the correct way to do it or not but it worked for me.