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?
According to the https://waikato.github.io/weka-wiki/faqs/OutOfMemoryException/, you can set the max heap up to 2GB. Easy way In “control panel-system-advance setting-environment variables” edit _JAVA_OPTIONS and change it to Xmx2g .
Increase the memory heap of the IDE If you are experiencing slowdowns, you may want to increase the memory heap. From the main menu, select Help | Change Memory Settings. Set the necessary amount of memory that you want to allocate and click Save and Restart.
For 64 bit platforms and Java stacks in general, the recommended Maximum Heap range for WebSphere Application Server, would be between (4096M - 8192M) or (4G - 8G).
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.
Run this command in your terminal:
java -Xmx1024m -jar weka.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With