java - Minimizing jar dependency sizes -


an application have written uses several third party jars. small portion of entire 50kb 1.7mb jar used - 1 or 2 function calls or classes.

what best way reduce jar sizes. should download sources , build jar classes need? existing tools can automate (ex briefly looked @ http://code.google.com/p/jarjar/)?

thank you

edit 1: lower size of third party 'official' jars swingx-1.6.jar (1.4 mb), set-3.6 (1.7 mb) glazedlists-1.8.jar (820kb) , etc. contain bare minimum classes need

edit 2: minimizing jar hand or using program proguard further complicated if library uses reflection. injection google guice not work anymore after obfuscation proguard

the answer cletus on post how determine classes used java program?

proguard option. can eliminate unused classes , methods. can use obfuscate, can further reduce size of final jar. aware class loading name liable break unless care taken keep affected classes unobfuscated.

i've found proguard quite effective - can bit cryptic understand @ outset. don't have experience similar offer comparison.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -