title: Set the heap size of java with Garbage collection enabled
body: <p>I am running JVM in a ubuntu ec2 instance which runs only solr and nothing else. Now I wanna configure the Heap size of the JVM which is running. The problem is I am not using Sun Jdk I am using the following versions and settings</p>
  
  <pre><code>java version "1.7.0_25"
  OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
  OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
  </code></pre>
  
  <p>How do I reset the heap size to my requirements.Also I want to enable the garbage collection. How can I do it. I am not running tomcat6. </p>
  
  <p>Kindly Help me</p>