Executable size problem
Ranjit Mathew
rmathew@gmail.com
Sat Jan 7 15:16:00 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFDv9v+Yb1hx2wRS48RApH2AJ49L7hc2PJoV1d36vuPAAclvo17WgCgg4y7
ifW5VtywSq0hJwHZ5YHR2Z4=
=CxU7
-----END PGP SIGNATURE-----
More information about the Java
mailing list