I'm currently using a method suggested by lots of people: Code (Text): ZipOutputStream out = new ZipOutputStream(new FileOutputStream(new File("./test.zip"))); ZipEntry entry = new ZipEntry("test/"); out.putNextEntry(entry); out.closeEntry(); out.close(); but instead of a folder, it creates a blank file, what am I doing wrong?
mmmh, normal all file names suffixed with a / get threated as folders. thats strange. I know that \ creates a empty file. maybe you got something mixed but. you should try both slashes.
ZipOutputStream does not support empty directories. If you don't put a file in there, the directory wont show up.
I tried both. opened the result with winrar, both slash give me an empty file, but when extracted, they become a folder.