• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Ant - Try to increase heap size error

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I'm getting the following error message in Ant when I build.
Can anybody explain why I am running out of memory after a number of builds and how I can fix (re-booting of course fixes it, but's a drag)

Thanks

Peter



null
ParameterImpl instances: 0
MethodImpl instances: 0
ConstructorImpl instances: 0
SimpleNode instances: 0
SourceClass instances: 0
XDoc instances: 0
DefaultXTag instances: 0
BinaryClass instances: 0
UnknownClass instances: 0
Total memory: 155
Free memory: 94
Try to increase heap size. Can be done by defining ANT_OPTS=-Xmx640m
See the JDK tooldocs.
/home/wardep/dev/autosalvage/claimcentrephase4/autosalvage-projects/common/components/uidgen-ejb/build.xml:76: null
BUILD FAILED (total time: 4 seconds)
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it always at line 76? What is the build doing there?

You could try fork=yes on, for example, java tasks.

Did you try doing what it suggested? "Try to increase heap size. Can be done by defining ANT_OPTS=-Xmx640m "
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm new to building java apps with ant, so bear with me. i'm trying to build my first java application with ANT (not a new app, but my first time building it). i'm also getting an out of memory error, so i tried the memory incrase (as suggested above), but i'm not sure WHERE to put that.

i know there should be an ant.config file (shouldn't there?) but there isn't and i'm not sure what's supposed to be in it. the only reference i have is an ant.bat file used when the app is built using a windows machine. we're a mixed platform group of developers, so it would be nice to be able to help out with builds as needed using my os x machine.

any tips, urls, etc. would be appreciated.
 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ANT_OPTS is an environment variable you can set, just like PATH and CLASSPATH are environment variables.

Ant manual - running ant describes ANT_OPTS as arguments that should be passed to the JVM like maximum head size.


ANT_OPTS - command-line arguments that should be passed to the JVM. For example, you can define system properties or set the maximum Java heap size here.

 
e. cordero
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the info! hopefully, that will help me figure out this (simple?) problem.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic