Increase heap size in java for weka

后端 未结 17 1322
天命终不由人
天命终不由人 2020-12-14 08:27

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

> java -Xmx500m -classpath

but

17条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 09:27

    For Mac OS, you have to edit a configuration file in order to increase the heap size of the Weka UI application.

    I am repeating what I wrote in: Is there a workaround to solve "Java heap space" memory error when the max heap value has been already specified?

    1. Quit out of Weka if it is running.

    2. cd into /Applications/weka-XXX.app/Contents , or wherever your weka executable was installed. There will be a file called Info.plist there. It is an XML text file. I suggest you save a copy of it to another location, as you'll need to edit it in the next step.

    3. Open the Info.plist (XML) file in your favorite text editor and look for a block that says "VMOptions". There should be a value that says "-Xmx256M" or something similar that specifies the maximum heap size. You should change that value to something bigger, such as "-Xmx1024M".

    4. Start Weka.

提交回复
热议问题