If you create zip files with the ZipOutputStream and forget to close or flush the stream correctly, you may be able to re-open them in Java, but it you try unzip or another command line utility, you will get a cyptic End-of-central-directory missing message.

Looking at the archive with octal dump (eg od -a broken.zip) exposes that fact that the central directory is there at the end…. but its missing a few training bytes. Closing the stream correctly will fix the problem.