« Return to Thread: Frequent java.lang.OutOfMemoryError: Java heap space error

Re: Frequent java.lang.OutOfMemoryError: Java heap space error

by Prashant Pharate :: Rate this Message:

Reply to Author | View in Thread

Hi,

If you are getting an exception "Outof memory in eclipse" try following

Right click on build.xml---->Run as--->External tool conf--->In environment variable add ANT_OPTS variable with value -Xmx512M -XX:PermSize=1024m. Then in JRE tab add virtual memory argument ....select from variable list ----> select ANT_OPTS-------->Apply run.........It will work.
All the best.



Stepan Mishura wrote:
On 12/10/07, Ravi Roy <ravi.aroy@gmail.com> wrote:
> Hello all,
>
> I am running my product build with cruisecontrol using ant 1.7.0.

Our testing infra hit the same problem with ANT 1.6.5.
As workaround the infra forks ANT build in a separate process.

Thanks,
Stepan.

I have set
> ANT_OPTS=-Xms=1536m -Xmx1536m, but still I am getting below mentioned error,
> I have searched mail archive, but I see ANT_OPTS settings, which I have
> already set, I get the following error :
>
>    [javac] The system is out of resources.
>    [javac] java.lang.OutOfMemoryError: Java heap space
>
> Am I doing right to set ANT_OPTS variable to increase the heap size ? I am
> running my build machine using Windows XP with 2.0 Gigabyte of physical RAM.
>
> Does somebody know how to handle this ? It is more frequent now.
>
> Thanks in adavnace for thoughts.
>
> Regards,
> Ravi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

 « Return to Thread: Frequent java.lang.OutOfMemoryError: Java heap space error