title: Increase heap to avoid Out of Memory Error in WEKA
body: <p>I am trying to run a classifier in WEKA, using a J48 classifier using the following command line:</p>
  
  <pre><code>$ java -Xmx2048m -cp /home/weka-3-7-9/weka.jar weka.classifiers.trees.J48 -t input.arff -i -k -d J48-data.model &amp;
  </code></pre>
  
  <p>Although the size of my arff is 43.8 M, and I aumented the heap space to 2048m,
  I still received the following errors:</p>
  
  <pre><code>Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      at java.util.ArrayList.&lt;init&gt;(ArrayList.java:132)
      at weka.core.Instances.initialize(Instances.java:196)
      at weka.core.Instances.&lt;init&gt;(Instances.java:177)
      at weka.classifiers.trees.j48.ClassifierSplitModel.split(ClassifierSplitModel.java:252)
      at weka.classifiers.trees.j48.ClassifierTree.buildTree(ClassifierTree.java:159)
      at weka.classifiers.trees.j48.C45PruneableClassifierTree.buildClassifier(C45PruneableClassifierTree.java:126)
      at weka.classifiers.trees.J48.buildClassifier(J48.java:249)
      at weka.classifiers.evaluation.Evaluation.evaluateModel(Evaluation.java:1485)
      at weka.classifiers.Evaluation.evaluateModel(Evaluation.java:649)
      at weka.classifiers.AbstractClassifier.runClassifier(AbstractClassifier.java:297)
      at weka.classifiers.trees.J48.main(J48.java:1062)
  </code></pre>
  
  <p>Does someone know if I am doing something incorrectly? Or can point me to a different solution to increase the heap?</p>
  
  <p>Thank you in advance.</p>