This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Is it possible to read and run files directly from a zip file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Is it possible to read and run files directly from a zip file?" Watch "Is it possible to read and run files directly from a zip file?" New topic
Author

Is it possible to read and run files directly from a zip file?

Fon Drank
Greenhorn

Joined: Feb 20, 2007
Posts: 14
Is it possible to create a zip file and use it like a regular directory structure? I would like to be able to store all my files directly to the zip file and read my files directly from it as well.

Or is there some alternative? Basically I need to have a bunch of files together in one central location. But I can't put them all in a regular directory. I need them to be all in one file.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

You could certainly use a ZIP file as a read-only directory with limited functionality. It isn't possible to update an existing ZIP file, and if you had an executable program in the ZIP file, you would have to copy it out to a real directory before you could run it. Likewise you couldn't treat anything else in it as a file.

But apart from that, a ZIP file is a good way to keep a bunch of files together in one place.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to read and run files directly from a zip file?
 
Similar Threads
How to write zip files into another zip file..?
Unable to read Properties file from Java code
invalid zip file
Creating spanned ZIP with Java?
Zip file creation with directory suppression through an API