I wonder if these numbers have some variation per platform? For me (on
Windows; 32-bit JDKs), the results of this test (java -verbose:class |
grep Loaded | wc -l) are:

1.5.0_22: 239
1.6.0_21: 274
1.7.0-ea-b103: 403

The diff from 1.5 to 1.6 is not bad, but JDK7 seems right now to be a
heavy regression... FWIW for such a simple test. For one thing, these
core-boot classes all come off the CDS file so their classloading
effort is relatively very small, and the delta will certainly be much
smaller for even the smallest real-world app.

A+
Osvaldo

2010/7/30 Mandy Chung <mandy.ch...@oracle.com>:
> Yongqiang Yang wrote:
>>
>> hi,
>>
>>     I just type command "java" under openjdk1.6, then the jvm will load
>> 308 classes, including             java/launcher/LauncherHelp,
>>            java/util/ResourceBundle,
>>            java/util/Currency,
>>            java/util/Locale,
>>            java/net/URL
>>
>>        When I use jdk1.5, the jvm just load about 180 classes, not
>> including the classes above.
>>
>>        Could someone figure out something wrong?
>
> New features and bug fixes in a new release could lead to more classes get
> loaded at startup.  We have done some work to lazily load classes if
> appropriate (see CR 6798873: Reduce the number of classes loaded and class
> dependencies).
>
> Mandy
>
>

Reply via email to