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 java.util.zip create an empty folder in 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 "java.util.zip create an empty folder in a zip file?" Watch "java.util.zip create an empty folder in a zip file?" New topic
Author

java.util.zip create an empty folder in a zip file?

Neil Han
Greenhorn

Joined: Apr 10, 2002
Posts: 14
First time try to create a zip file by using java zip api. It works just fine, there is one thing I can not do, I can not create an empty folder in the zip file that I am creating?
Can a zip file contain an empty folder? If it can how?
Thank you.
[ January 15, 2003: Message edited by: Neil Han ]

Time flies.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Hmmm... this doesn't seem to belong in the Swing/JFC/AWT forum... I'll move it to Java in General (Intermediate)...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
Why can't you just put a small file in the folder, to keep the folder.
Neil Han
Greenhorn

Joined: Apr 10, 2002
Posts: 14
Just a thought, if it doesn't work, that is a good idea to get around it. Thanks for your advice.
I have did a search on Google, seems there is not a good answer to it.
If any one has any idea please let me know.
---------------------------
hanxuerui.50megs.com
Neil Han
Greenhorn

Joined: Apr 10, 2002
Posts: 14
Man, you are crazy!
Are those the certifications what you have got?
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
You are welcome! Neil.
Yes, those are my certs. It took me a while and a couple of bucks to get them.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You could also add "Longest, loudest signature at JavaRanch" to the list.
:roll:
How do you measure signal to noise ratio?
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
Originally posted by David O'Meara:
How do you measure signal to noise ratio?

Signal? noise? I never thought about those.
At least, Maxwell don't make a lot of noise.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.util.zip create an empty folder in a zip file?
 
Similar Threads
Creating .ear file from zip file
Unable to connect
Linux problem getting error in creating folder via tomcat app
Programatically creating directory in zip file
How to download a file in IE?