• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic