Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Extract File From Zip Archive  RSS feed

 
Isaac Hewitt
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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.

 
rohit leeta
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This example may help:

http://www.java-tips.org/blog/java-se/how-to-modify-a-jar-file.html
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!