2

I am loading a jar file with a JarClassLoader. After the jar file is loaded, I want to delete the file. Everything works fine except for deleting the file because the file is kept in use by the Java jvm. How do I unlock the jar? I am already closing all my inputstreams and closing the urlclassloader.

Thank you, Ridz

Ridz
  • 407
  • 1
  • 6
  • 16
  • have you checked this question? http://stackoverflow.com/questions/3997902/can-a-loaded-jar-be-deleted-by-the-java-process – Omar Mainegra Sep 16 '13 at 18:09
  • Thanks, I have now. However, I am not trying to uninstall something and the process with remain alive until forever. I can't wait until the process dies out, unfortunately. I am, like the second answer suggests, closing the urlclassloader. – Ridz Sep 16 '13 at 18:12
  • I followed the URL posted in second answer and it seems promising – Omar Mainegra Sep 16 '13 at 18:16
  • As I said, I am already closing the urlclassloader. – Ridz Sep 16 '13 at 19:34

0 Answers0