Atom Feed SITE FEED   ADD TO GOOGLE READER

Shrink your Jars, its easier than you think!

James just referred me to the Ant <classfileset>. It examines dependencies between your .class files and removes any of the ones you don't actually need at runtime.

Why is this useful?
Suppose you're building an app with some Jakarta libraries. Inevitably, you'll get the 2 classes you need, plus 98 you don't. Unfortunately, without <classfileset>, there's no reliable way to know which classes you can get rid of, since your 2 required classes could depend on 8 other classes.

Give me more reasons why this is useful.
With widespread adoption and understanding of the <classfileset> task, API developers like myself can be more generous in adding classes to the libraries. Without <classfileset>, each class I add to Glazed Lists increases the size of glazedlists.jar, regardless of whether anybody uses it. With the <classfileset> task, I can be somewhat more generous because the class doesn't necessarily place as much burden on disinterested users.

So is glazedlists.jar going to jump from 300K to 1.2Gb?
Not anytime soon. As far as I am concerned, the most important weight of a library is the size of the publicly exported API. It sucks when I'm reading through the Javadocs for some new library and half the classes are implementation-details and support classes for the real APIs. It also sucks when the API author can't distill the API to be as compact and learnable as possible. Since <classfileset> doesn't do anything to simplify the learning curve of a larger API, I'm not going to let our API become bloated.
I read over your blog, and i found it inquisitive, you may find My Blog interesting. My blog is just about my day to day life, as a park ranger. So please Click Here To Read My Blog

http://www.juicyfruiter.blogspot.com
hi, 2 things...

This tip is great for java web start applications where download of jars is a big matter when talking about jar size

And second I just spend a couple of hours checking your project, very good job, shame I didn't find this before begining my actual project :( and this is the really point I haven't heard about you before and the project seem really solid and very impresive to me much more than other projects that I have been checking last months like jlabs and swingx... over all your effort in documentation and screencast is great. Maybe this projects should check yours...


David CastaƱeda