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.
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.
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!