• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant Failing with OutOfMemory Execption in Eclipse

 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting an OutOfMemory error using Ant and need to increase the heap space.

So, In Eclipse's Run...External Tools...External Tools Configurations...JRE, I added the following value to the "Arguments" area:

-XmX 1024

However, when I then try to run the Ant script, nothing happens. The script does not run.

If I remove the argument above, then the script "runs" again, but, again, with the OutOfMemory problem.

I've tried reducing the value from 1024 to 128, etc., tried removing the space after the last X above, but nothing has worked so far.

So, any suggestions on how to correctly increase the heap memory available for an Ant build would be appreciated.

Thanks.

- Mike
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe it should be -Xmx1024M
 
Mike London
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right, tried that too.

I read that there's a workaround where you need to go into the install JVMs and set this variable there. I'll try that later.

Thanks for your reply.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe Eclipse actually spawns a separate VM, so adjusting Eclipse's environment probably won't help. Try the External Tools/Ant options, instead.
 
Mike London
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

I had tried to set the ant options in Eclipse and could never get the syntax right.

Could you please give me the ANT configuration string and tell me where it should go in Eclipse?

Thanks very much in advance.

-- Mike
reply
    Bookmark Topic Watch Topic
  • New Topic