Re: If I'm an executable jar, can I delete myself?



On Tue, 30 Oct 2007 11:03:31 -0400, "Josh Hester"
<josh.hester@xxxxxxx> wrote:

Is this possible? I have a jar that is an uninstall program and needs to
delete itself after it runs.

What is actually running is the copy of the file in memory. It is
perfectly possible for the copy in memory to delete the copy on disk,
provided the file is small enough to load into memory in one piece.

Just delete it as you would any other file. You will need the
required security permissions of course as with any file deletion.

rossum

.