In <
j8hio7hve9i127gi6...@4ax.com> Roedy Green wrote:
> It coming clear to me the astounding amount of junk that gets carried
> around in jars.
There's nothing stopping you from using a optimizer, like Proguard, to
inline methods, variables, and even merge classes. If you use Maven you
can also use the shade plugin to merge jars, and include only the classes
you really use from your dependencies.
One disadvantage is that you wont get a stacktrace that reflect your
code unless you postprocess the staktrace. You also need to be mindful
of code that use reflection as the optimized code normally does not
keep the original class and method names.
Using proguard is normal for systems that needs it, like Android and
Java ME. I have a hard time imagining a current day desktop or server
system where a couple of megabytes of additional jar files atually
matters very much.
Still I can agree that there is a problem here. One of my objections
to using Spring is that the war-files quickly grow very large due
to dependenies. A web app easily grow to somewhere between 15 to 25
megabytes when you use Spring and some persistence framework, like
hibernate, which admittedly also adds quite a lot. Event with fast
networks and huge disks it bothers me having to lug around copies
of all that framework junk in every webapp I have to build.
--
Fredrik Jonson