On Thu, 11 Apr 2002, Detlef Brendle <[EMAIL PROTECTED]> 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?

Stefan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to