26 Şubat 2013 Salı

Weka GUI - OutOfMemory

"Not enough memory. Please load a smaller dataset or use a larger heap size."

Weka sometimes gives this error, if you use large datasets. To handle it, specify a larger heap size by changing the RunWeka.ini configuration file. The file is in the Weka folder of your Program Files directory on Windows. You should increment the value of the variable which regulates maximum heap size, such as "maxheap=1024m".

Exception in thread “main” java.lang.OutOfMemoryError: Java heap space

While using eclipse to run Java program, I was faced with the error below;
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
Reason;
Eclipse uses default value of memory, if you don't change it. While using large data in your program, this default value is not enough.
Solution;
Eclipse>Windows> Preferences> Java> Installed JREs> Select the JRE> Click edit> Write in the Default VM Arguments: -Xmx1024M or any other amount of memory ...