any free de-bloaters??

Given that a user application only uses a small subset of functionality in libraries, are their any (free) tools that can actively chop a library down to the minimum size required to run the user application? Useful for applet serving or any network delivery of java applications for that matter.

IBM has JAX and that did it.

are there free alternatives??

If not, then I have prototyped a way of doing it using http://www.cs.purdue.edu/homes/hosking/bloat/. If no-one knows of a free tool then I will try to make my solution a generic ant task.

java -verbose:class

Just make sure you run every bytecode you need.

Ehhh that’s pretty cool! However, its lazy loading classes so unless you test cases have 100% code coverage their is a reasonable chance that it won’t hit a required class.

The method I have going does actually detect what code is not required at the method level, and prunes individual methods from classes. So what I have prototyped would be better than a tool built on the -verbose functionality.

I found JARG, but that doesn’t let you define what the entry points into your system are, so I can’t imagine it can be that aggressive. The tool I have starts with a list of entry points (like JAX). Any method not possible to be called from that set is deleted. There will be issues regarding AWT callbacks and such like, I have only done a feasibility study, but those issues are solvable if I have reason to continue.

Edit: Proguard is the correct answer, I think.

There is a selection of Obfuscators, which are very effective. http://sourceforge.net/projects/proguard/ allows you to shrink & optimize, but this can be done without turning everything to gibberish, if you so wish.

You can also collapse your package hierarchy, which saves space, and still read the Exception stack traces. This might be a problem, if you did not write those libraries, but again this is optional.