This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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: 16483
    
    2

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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
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..?
Zip file creation with directory suppression through an API
Unable to read Properties file from Java code
invalid zip file
Creating spanned ZIP with Java?