JAR files are ubiquitous to Java users and programmers. But just how much do you know about them? Learn the ins-and-outs of Java archive files, including their innate support for indexing, programmatic creation and manipulation, security, and data integrity.
JAR is very nifty like when you deal with things like mozilla
hmm, afaik they could have just used plain zip instead.Am I wrong?
hmm, afaik they could have just used plain zip instead.Am I wrong?
Did you read the article at all? ๐
Did you read the article at all? ๐
Yes…. ?
Then you’d have understood that JAR has a lot more functionality to zip does, like indexing, security and integrity checking.
Then you’d have understood that JAR has a lot more functionality to zip does, like indexing, security and integrity checking.
But the way they do it, with a META-INF dir, it can be done with any archive format. Afaik a jar is a zip, and can be unpacked with normal zip utilities aswell ..
…but thank god that new, ugly-ass osnews l&f has been dumped.
Sannder: in a JAR, filenames are encoded in UTF-8. Thats makes a major difference with bare zip files in non english envirnoments. So you can not correctly unpack all JARs with zip tools.
The file format for OpenOffice.org documents (*.sx?) is a JAR file containing XML files, and other embedded files (images…).
Regular ZIP has no problem with UTF-8 filenames; we used it for years that way on BeOS. If you unpack the archives on a system that doesn’t understand UTF-8, you’ll have some odd file names, but that’s it… you can still get at the data.
They could have used another archive format, but zip is free (in the RMS sense), has excellent compression, and has a well-documented and extensible file format. Naturally Sun’s NIH syndrome resulted in a “new” tool for creating the files instead of building on Info-ZIP’s well-debugged code, but hey, everything needs to be rewritten in Java, right? *gag*
ZIP’s biggest problem these days are its limits (which will apply to JAR files as well): http://www.info-zip.org/FAQ.html#limits
There is some effort underway to extend ZIP with 64-bit limits instead of 32-bits, but I haven’t really had much time to pay attention to what’s going on.
– chrish (former Info-ZIP maintainer for BeOS, QNX, Atari ST)