I am loading a jar at runtime using java URLClassloader. When a jar is loaded, jvm takes a lock on it. so IA uninstaller can not delete it during uninstallation. (bcoz file is in use) Is there any way to delete file after the uninstaller.exe completes its execution. Bcoz the uninstaller related files like uninstaller.jar and jre are deleted after uninstaller.exe is finished. Is there any way to add the locked jar in this? Or some way to delete the file after the jvm is stopped i.e. uninstaller.exe is finished ?