There is proguard , with ant and maven plugins. It deletes an unused code, optionally confuses and compresses to one jar.
Proguard reduces size on two fronts
- only those classes that are actually used are stored in the last bank.
- , . , , , .
, java, . , , , . Class.forName( "xyzFoo" ), - , . , classloader , , .
pack200, .