Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Archive can't be deleted after extracting #28

Closed
u09068ee opened this issue May 13, 2014 · 1 comment
Closed

Archive can't be deleted after extracting #28

u09068ee opened this issue May 13, 2014 · 1 comment

Comments

@u09068ee
Copy link

Simulation Steps:

  1. Use extractArchive method of the ExtractArchive Class to extract the .rar file.
  2. Once extracted, try to delete the original archive.
  3. It gives error that the archive is open in java (TM)**********
@u09068ee
Copy link
Author

Reason:

  • You forgot to close the archive (arch.close()) in the extractArchive method of the ExtractArchive class.

Workaround:

  • Close the IDE ->Try to delete the archive and bingo.

Solution:

  • Add these statements at the end of the extractArchive method of the ExtractArchive class
try {
      arch.close(); 
} catch (IOException e) {
    System.err.println("Caught IOException: " + e.getMessage());
} 

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant