Hello, an application I have written uses several third party jars. Sometimes only a small portion of the entire 50kB to 1.7mB jar is used - one or two function calls or classes.
What is the best way to reduce the jar sizes. Should I download the sources and build a jar with just the classes I need? What existing tools can help automate this (ex I briefly looked at http://code.google.com/p/jarjar/)?
Thank you
Edit 1: I would like to lower the size of my third party 'official' jars like swingx-1.6.jar (1.4 MB), set-3.6 (1.7 MB) glazedlists-1.8.jar (820kB) , etc. so that they only contain the bare minimum classes I need
Edit 2: Minimizing a jar by hand or by using a program like proguard is further complicated if the library uses reflection. http://stackoverflow.com/questions/2369939/injection-with-google-guice-does-not-work-anymore-after-obfuscation-with-proguard
The answer by cletus on another post is very good http://stackoverflow.com/questions/475516/how-to-determine-which-classes-are-used-by-a-java-program