title: Out of memory error in ant
body: <p>I am trying to run ant task, however I get the following error:</p>
  
  <pre><code>[javadoc] javadoc: error - java.lang.OutOfMemoryError: Please increase memory.
  [javadoc] For example, on the Sun Classic or HotSpot VMs, add the option -J-Xmx
  [javadoc] such as -J-Xmx32m.
  [javadoc] 1 error
  [javadoc] 103 warnings
  </code></pre>
  
  <p>I have tried googling to find out how I can set this value, but I cannot find it.
  I have tried </p>
  
  <pre><code>&lt;javadoc maxmemory="256m"&gt;
  </code></pre>
  
  <p>I have tried</p>
  
  <pre><code>export ANT_OPTS=-Xmx256m
  </code></pre>
  
  <p>but I still get the same exception. I have tried to increase the value to 1024m witouth any success</p>
  
  <p><strong>Update</strong></p>
  
  <p>I solved it. It had nothing to do with little memory. It was an endeless loop in my javadoc generation.</p>