{"id":1929,"date":"2009-12-23T21:15:06","date_gmt":"2009-12-23T16:15:06","guid":{"rendered":"http:\/\/www.chiragmehta.info\/chirag\/?p=1929"},"modified":"2009-12-23T21:15:06","modified_gmt":"2009-12-23T16:15:06","slug":"increasing-java-heap-for-ant","status":"publish","type":"post","link":"https:\/\/www.chiragmehta.info\/chirag\/2009\/12\/23\/increasing-java-heap-for-ant\/","title":{"rendered":"Increasing Java Heap for Ant"},"content":{"rendered":"<p>I ran across a little tip tonight I thought I should share. Trying to perform a large <strong>Salesforce Code migration<\/strong> with Ant kept giving me the following error: <strong>Out of memory. Increase Heap Size.<\/strong><\/p>\n<p>This is a Java error indicating that the virtual machine is out of memory. So now I know what the problem is, what next? If I was launching from a command line changing the heap size is not that tough. Just look up the options for java and set a new value, <strong>but I\u2019m using Ant<\/strong>. Looking at the Ant shell script or batch file was no help.<\/p>\n<p>Well a bit of Googling turned up that Ant looks for an environment variable called <strong>ANT_OPTS<\/strong> which is use to set Java parameters. Just set the environment variable and off you go. So I added the following to increase the heap size:<\/p>\n<blockquote><p>export ANT_OPTS=-Xmx256m<\/p><\/blockquote>\n<p>That sets the maximum heap size to 256 Megabytes. So if you ever need to increase the size of the Ant JVM, now you know how.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I ran across a little tip tonight I thought I should share. Trying to perform a large Salesforce Code migration with Ant kept giving me the following error: Out of memory. Increase Heap Size. This is a Java error indicating that the virtual machine is out of memory. So now I know what the problem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[7],"class_list":["post-1929","post","type-post","status-publish","format-standard","hentry","tag-others","post-preview"],"_links":{"self":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/comments?post=1929"}],"version-history":[{"count":1,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1929\/revisions"}],"predecessor-version":[{"id":1930,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1929\/revisions\/1930"}],"wp:attachment":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/media?parent=1929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/categories?post=1929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/tags?post=1929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}