Weka uses the memory settings passed to it from the Java command line or the script that invokes it. If you're experiencing an OutOfMemory exception, you must increase the amount of heap space available to Weka by changing the Java options that set memory allocation. Follow the directions below to accomplish this.
- Exit Weka if it is currently running.
- If you are running Weka standalone from the command line, modify your Java command to include an -Xmx line that specifies a large upper memory limit.
java -Xmx2g weka.jar
- If you are running Weka as part of a script, change your Java invocation so that it includes the above -Xmx setting.
- Start Weka and ensure that there are no memory-related exceptions.