• 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 build - OutOfMemoryError in eclipse

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get 'outofmemoryError:java heap size' while running ant build in eclipse.
As a work around, I have set the ANT_OPT in environment tab of eclipse JRE and "-Xms40m -Xmx512m" for VM in eclipse, but still I get OutOfMemoryError.
Please help.
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse isn't running of memory, it is Ant. You need to set its options within Eclipse (I don't know where exactly, I don't use Eclipse but it should be easy).
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, you have to find out whether Ant is running inside Eclipse (within the same JVM), or if it running outside of Eclipse (in a separate JVM). If you don't know, there are two things you can try:

a) Run Ant from a command prompt. Make sure you set the ANT_OPTS. If that works, most likely you were running Ant within Eclipse. If that doesn't work (still get an OOME), then your heap size is still too small.

b) Change the heap size for Eclipse. To do this, edit the eclipse.ini file and change the existing settings. If that works, then Ant is running within Eclipse.
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Added this recipe to my notebook, thank you.
 
Ramesh Kumar Swarnkar
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter, thanks for your input.
It really helped me to resolve this. It works now thankx.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ramesh, I'm glad that you got things running, but would you please describe exactly what you did to fix your problem? Such information will be helpful to the next persons that has the same issue and comes across this post. Thanks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic