This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Java heap error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Java heap error

Peter Warde
Ranch Hand

Joined: Aug 18, 2004
Posts: 71
After doing a lot of compiling with Ant I get a build failed with a message about the heap. What's this and how can I fix it?
Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
Can u post ur exception stack trace?... also if nething abt heap is being complained... it may be coz u may be declaring number of Objects in loop???....

Peter Warde
Ranch Hand

Joined: Aug 18, 2004
Posts: 71
This is my output in my Ant build.xml file. How do I increase the heap size? Thanks Peter

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/dev/autosalvage/claimcentrephase4/autosalvage-projects/common/components/uidgen-ejb/build.xml:76: null
BUILD FAILED (total time: 4 seconds)
Peter Warde
Ranch Hand

Joined: Aug 18, 2004
Posts: 71

I've posted this to the ANT, Maven and other build tools forum as I think it is more appropriate there.

I agree. Here's the link:
subject: Java heap error
Similar Threads
WA #1.....word association
Question of garbage collection
does the stub depend on the client location?
Help with Garbage Collection
static block