On 10/18/06, Steve Loughran <[EMAIL PROTECTED]> wrote:
Milan Kubec wrote:
> Hello,
> I want ant to generate heap dump when OutOfMemoryError happens during
> the build to find the problem in the task. I tried adding following
> switches to .antrc file: -XX:+HeapDumpOnOutOfMemoryError
> -XX:HeapDumpPath=e:\ant.hprof
> But it doesn't seem to get to the correct process, in other words -
> nothing happens. Is there some other way to generate heap dump from ant.
> I'm using Ant 1.6.5 on JDK 1.5.0_09.
>
If the problem is in Ant's own process, set the ANT_OPTS env variable to
the options.
export ANT_OPTS="-XX:+HeapDumpOnOutOfMemoryError"
on unix or cygwin
set ANT_OPTS="-XX:+HeapDumpOnOutOfMemoryError"
on windows.
Peter
If it is in some forked java process (like javac), you need to set the
options inside ant by whatever element the task offers to set JVM
options, usually <jvmargs>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]