aspose file tools*
The moose likes Java in General and the fly likes Password protect existing zip file in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Password protect existing zip file in java" Watch "Password protect existing zip file in java" New topic
Author

Password protect existing zip file in java

cle tan
Ranch Hand

Joined: Jun 11, 2012
Posts: 68
I have an existing zip file and I want to run a java application, after which, it's password protected.
People opening the zip file would have to enter the correct password to unzip the file.

Currently using zip4j http://www.lingala.net/zip4j/
but i noticed it does not have a method to password protect an existing zip file.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41488
    
  52
There is no standard method to password-protect a zip file. Each archigin utility that offers it would implement its own way. The most common one is probably WinZip's method, but even that is not universal. So - you're largely out on your own for this.


Ping & DNS - my free Android networking tools app
cle tan
Ranch Hand

Joined: Jun 11, 2012
Posts: 68
wonder anyone has faced and solved this problem before?

doesn't look like winzip has its own java library to password protect an existing zip file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Password protect existing zip file in java