Ranjit Mathew | 7 Jan 16:19

Re: Executable size problem


Andrea aime wrote:
> 
> I'm wondering, why every class of the standard runtime has to
> be compiled into the simple hello world style app? I understand dynamic

The Java runtime library is unfortunately rather heavily
inter-linked. Even a simple "Hello World" class loads in
an additional 293(!) classes with Sun's JDK 1.5.0-05 on
Linux:

  ~/src/tmp > java -verbose:class Hello |grep Loaded |wc -l
      294

I'm not saying that GCJ is blame-free here, but you
should keep the above in mind when comparing the sizes
of "Hello World" applications across, say, C, C++ and Java.

I really wish they had given some more thought to
library design and adopted a layered approach (beyond
J2SE and J2EE). No wonder the J2ME guys had to come
up with so many kludges. Rather ironic considering
that Java was supposedly meant for embedded devices
when they started the project. :-/

Ranjit.

--
Ranjit Mathew       Email: rmathew AT gmail DOT com

Bangalore, INDIA.     Web: http://ranjitmathew.hostingzero.com/


Gmane