79774638

Date: 2025-09-25 09:43:18
Score: 0.5
Natty:
Report link

You can't "delete" or "modify" an entry in the archive without creating a new one.

The typical way to "update" a ZIP file in Java is to create a new, temporary ZIP file. You read the old ZIP file entry by entry, writing all the entries you want to keep to the new ZIP file. When you encounter the file you want to replace, you simply write the new version of that file to the new ZIP. Finally, you delete the original ZIP file and rename the new one to the original name.

Even if you find any other alternative third party tools which can do this. please avoid as it is technically highly risky

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Vamsi Krishna