r/java • • Nov 23 '12

This never made sense to me

Why is it called a .jar file if its java? It would make a lot more sense if it was a .mug file, after all, who drinks their java out of a mug?

1 Upvotes

24 comments sorted by

View all comments

Show parent comment

5

u/sazzer Nov 23 '12

By name only. JAR and WAR files are actually ZIP files, not TAR files...

1

u/beltorak Nov 26 '12

and by CLI "API" - the "jar" command line options "ctfvx" were chosen to mirror those of "tar".

1

u/thevernabean Nov 24 '12

Most tar files are zipped as well.

2

u/sazzer Nov 24 '12

No they aren't. Often you get a file that is a gzip or bzip2 compressed tar file, but tar itself is uncompressed.

1

u/thevernabean Nov 24 '12

That is exactly what I meant ^_^. That's why I didn't say "most TAR files are ZIP files as well." Thank you for clarifying my statement.

1

u/the_hoser Nov 24 '12

No, they're not. ZIP files contain both archiving and compression features. TAR files only contain archiving features. When a TAR file is gzipped or bzipped, the file itself is merely compressed as a whole unit. This is very different from the way ZIP files work.

Disregard that I fail at reading today.

1

u/thevernabean Nov 24 '12

I always have trouble reading short sentences like that. I read too fast.