ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Cannot delete jar files
Date Wed, 08 Nov 2000 07:56:43 GMT
At 08:51  8/11/00 +0100, you wrote:
>>>>>> "WS" == William Settle <> writes:
> WS> I jar two sets of packages and for discussion sake, I'll call
> WS> them a.jar and b.jar.  Both files are included in my classpath
> WS> After a successful build everything's fine unless I re-run the
> WS> build.  My "clean" target attempts to delete existing jars but
> WS> fails with a message that says:
> WS> BUILD FAILED C:\autoBuild\build.xml:23: Unable to delete file
> WS> D:\develop\jar\a.jar
>I think you will never be able to delete a file that is in the JVM's
>CLASSPATH on Windows because the JVM locks it (and I vaguely remember
>it won't release that lock even if you don't need the file).

It will release it when all classes loaded from it are disposed of which
means shutting down the classloader. But not all JVMs actually do proper
garbage disposal ;(



| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |

View raw message