title: Setting Java Heap Size under Apache Karaf
body: <p><em>I apologize if this is a duplicate, but I can't seem to find this answered anywhere.</em></p>
  
  <p>What is the best way to increase the maximum Java heap size when using Apache Karaf?</p>
  
  <p>Currently, I modified the following line in the karaf.bat file: </p>
  
  <p><code>set DEFAULT_JAVA_OPTS=-server -Xmx&lt;NewMaxValue&gt;M</code>.</p>
  
  <p>I feel like modifying the bat file is not the best solution. Additionally, none of the config files seem to have a place to put this.</p>
  
  <p>Thanks</p>