title: programmatically setting max java heap size
body: <p>Is there a way to set the max java heap size programmatically instead of as a vm argument?</p>
  
  <p>Something like:</p>
  
  <pre><code>System.getProperties().put("&lt;heap variable&gt;", "1000m");
  </code></pre>