• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 390
  • Last Modified:

jar using ant tool Vs jar using jar utility avail with jdk

Are there any difference between the jar file created using ant tool and creating manually with the help of jar utility, available with jdk.  Because there is a size difference when I modify a jar file its size gets reduced by half.

Jar file has 600 kb.  I extract it and replace it with the modified file (though I can use mf option).  When I do jarring again that jar only shows 312 kb.  I could not find out what exactly went wrong.
0
Ravi Kiran Reddy Katkuri
Asked:
Ravi Kiran Reddy Katkuri
  • 3
  • 2
2 Solutions
 
CEHJCommented:
They're not necessarily the same. Did you specify compression?
0
 
objectsCommented:
there just using different compression (which you can specify via command line/ant aparameters)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CEHJCommented:
The first one may have been using no compression at all
0
 
Ravi Kiran Reddy KatkuriAuthor Commented:
can you please answer below questions related to comparision:
1. What comparition is done in the jar files.
2. What kind of comparision is included in the jar while creating
3. What is the sintax to include the comparision in the jar files, while creating the Jar in, command line/ant parameters
0
 
CEHJCommented:
1. Zip compression is done unless specified none ( -0 )
2. Don't understand - only entries are compressed (see 1)
3. jar has only the option not to compress (see 1) Ant uses level="0" to level="9"
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now