ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Ant project question
Date Thu, 11 Apr 2002 11:12:21 GMT
On Thu, 11 Apr 2002, Detlef Brendle <> wrote:

> At the second time Ant cannot delete certain files (jar files for
> compiling the project).
> My idea was to set the project instance to null after beeing used -
> but this doesnt help me.

You should make sure that Project#fireBuildFinished has been called -
this one will trigger a cleanup in all classloaders Ant has
instantiated.  Also put a System.gc after setting project to null.

But it may not be enough even after that.  The Java VM itself is known
to not close jar files that are on the classpath, so you cannot delete
those files as long as your Java VM is running.

Can you spawn separate VMs for your Ant runs so that you gert a chance
to clean up?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message