title: javac: java.lang.OutOfMemoryError when running ant from Eclipse
body: <p>I have given loads of memory to  eclipse in the ini file but its still not using anything more than 300mb which i can see in the task manager.</p>
  
  <pre><code>  [javac] The system is out of resources.
      [javac] Consult the following stack trace for details.
      [javac] java.lang.OutOfMemoryError: Java heap space
      [javac]     at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:1938)
      [javac]     at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:1835)
      [javac]     at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1522)
      [javac]     at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
      [javac]     at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:377)
      [javac]     at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:190)
      [javac]     at com.sun.tools.javac.comp.Annotate.enterAnnotation(Annotate.java:167)
      [javac]     at com.sun.tools.javac.comp.MemberEnter.enterAnnotations(MemberEnter.java:743)
      [javac]     at com.sun.tools.javac.comp.MemberEnter.access$300(MemberEnter.java:42)
      [javac]     at com.sun.tools.javac.comp.MemberEnter$5.enterAnnotation(MemberEnter.java:711)
      [javac]     at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:95)
      [javac]     at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:87)
      [javac]     at com.sun.tools.javac.comp.Enter.complete(Enter.java:485)
      [javac]     at com.sun.tools.javac.comp.Enter.main(Enter.java:442)
      [javac]     at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819)
      [javac]     at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
      [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:353)
      [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:279)
      [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:270)
      [javac]     at com.sun.tools.javac.Main.compile(Main.java:69)
      [javac]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javac]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [javac]     at java.lang.reflect.Method.invoke(Method.java:597)
      [javac]     at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56)
      [javac]     at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1065)
      [javac]     at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882)
      [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      [javac]     at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
      [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [javac]     at java.lang.reflect.Method.invoke(Method.java:597)
      [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  </code></pre>
  
  <p>this is my ini file which i have. </p>
  
  <pre><code>--launcher.defaultAction
  openFile
  --launcher.XXMaxPermSize
  512M
  -showsplash
  org.eclipse.platform
  --launcher.XXMaxPermSize1024m
  --vm
  C:\Program Files\Java\jdk1.6.0_24\bin\javaw.exe -vmargs -Xms512m -Xmx1024m
  </code></pre>
  
  <p>I have no idea why it wont use the memory I am giving it. Do i need to do anything else to change the heap size?</p>
  
  <p>Thanks</p>