Jar utility can compress files? - Digizol6

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Wednesday, June 13, 2007

Jar utility can compress files?

Java archive creator is the Jar tool. Is it just a packaging tool or does it compress and package (like zip utilities)? It can compress and package, also by default compression is on. So all the jar files that others have created so far may be compressed (since they did not turn off that).

You can turn off the compression feature by using the 0 (zero) option of the jar command. The command would look like follows.

jar cvf0 TicTacToe.jar *.class

So what's the big deal? It's always better to compress it!!! Many may think so?

No, that's not the truth. There are reasons why you should turn off the compression. For a situation where a jar file is loaded to a browser, uncompressed jar will be suitable over a compressed jar. Uncompressed JAR files can generally be loaded more faster than compressed files because the need to decompression overhead is eliminated. However there's a trade-off, for an uncompressed jar download time over a network may be longer. So decision must be taken by considering both aspects.

5 comments:

  1. Hi Kamal!
    Wow, most of this stuff is soooo over my head :)) I mean, I thought I was a techno-neophyte but when I visit a site like this, I KNOW it!

    I have been looking into adsense for my site, but I have heard some not so good things about it, what has been your experience overall?
    Slainte~
    Rachelle

    ReplyDelete
  2. Welcome Rachelle. Up to now, no issues. You can email me separately to talk more on this topic.

    ReplyDelete
  3. Hi Kamal

    I agree with rachelle. This stuff is way,way over my head.
    I enjoyed the story about the American GI whose wife gave birth 2 years after his death, using his sperm.

    I am still struggling with my site. I would like to make it look nice but I still am short of the tehcnicalknow how.
    Regards

    Englsihsinseh

    ReplyDelete
  4. Hi Kamal, just a little message to say a big thanks for your kind comments. Your encouragement is greatly appreciated. Similar to Rachelle's comments - your blog data is a bit over my head but nonetheless, looks extremely impressive and professional. Kind reagrds, Arty Dave

    ReplyDelete
  5. Welcome Englishsinseh and Dave, all your comments are appreciated and keep in touch as I'm not posting only tech stuff.

    ReplyDelete

Post Top Ad

Responsive Ads Here