• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Extract File From Zip Archive

 
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question is addressed to anyone with experience in Zip files.

I have had no problem unzipping the entire contents of a zip archive.

I have another method to extract only one file, but when I try to open the extracted file, I find that each time the extracted file has 0 bytes in it, so I don't think it has been extracted. I tried so many things and searched high and low on the Internet but to no avail.

The idea is to allow the user to open a file in the archive to see its contents.

So I want it extracted to a temporary location and then from their calling Runtime.exec().



the returned String is used in conjuction with another method called from actionPerformed() in a MenuItem.

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This example may help:

http://www.java-tips.org/blog/java-se/how-to-modify-a-jar-file.html
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic