DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Alternative Structured Concurrency
  • Optimizing Java Applications for Arm64 in the Cloud
  • JDK 17 Memory Bloat in Containers: A Post-Mortem
  • Understanding Table Statistics in SQL Server: Importance, Performance Impact, and Practical Examples

Trending

  • The Hidden Bottlenecks That Break Microservices in Production
  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Detecting Advanced Persistent Threats Using Behavioral Analytics and Log Correlation
  • Introduction to Retrieval Augmented Generation (RAG)
  1. DZone
  2. Coding
  3. Java
  4. Fun Statistics About JDK 20

Fun Statistics About JDK 20

The Java Development Kit contains many files. Last month JDK 20 was released. Let's take a deep dive into what files the JDK contains.

By 
Anthony Goubard user avatar
Anthony Goubard
·
Apr. 26, 23 · Analysis
Likes (1)
Comment
Save
Tweet
Share
4.5K Views

Join the DZone community and get the full member experience.

Join For Free

As Java developers, we all have it installed on our computer: the Java Development Kit, also known as the JDK. The first version was just a few megabytes and could be saved on a few floppy disks. Many years later, it has grown multiple times. In this article, we will deep dive into the files of the JDK and come up with statistics about them.

In this study, Temurin JDK 20 for Windows x64 has been used.

The Files

The JDK files in statistics :

  • Total size: 317 MB
  • Largest file: lib/module with 130 MB
  • Smallest file: lib/jvm.cfg with 29 B
  • 574 files
  • 46,393 files when including files in compressed files
  • 27,064 class files (26,992 in JDK 19)
  • 15,044 java files

Largest class files and smallest java files

Largest class files and smallest java files

Let’s analyze all these numbers!

The lib/module file contains the classes of JDK compressed in an unknown format. You can use the bin/jimage tool included in the JDK to list the files or to extract them. That also means that the classes of the JDK are duplicated. There are in the lib/module file and in the jmod/*.jmod files. When I select all the jmod files, I get 77 MB, meaning that the lib/module file is less compressed that jmod.

Before JDK 9, most of the classes were in a rt.jar file. With the modularisation of the JDK, each class belong to a module which is in a separate file with the jmod extension. The largest module is java.base.

The size of the modules

The size of the modules

26,976 class files (excluding the classes from lib/module) vs. 15,044 java files (in lib/src.zip) means that inner classes and lambdas are often used in the JDK. I found 3,641 lambdas/anonymous classes ($1, $2, …) and 8,781 inner classes.

The Classes

The classes in statistics:

  • The longest class name is InternalFrameTitlePaneMaximizeButtonWindowNotFocusedState located in the javax.swing.plaf.nimbus package.
  • There are no public class with 2 letters, only internal ones.
  • The smallest class name length in public classes are 3 letters class names: URL, URI, Map, Set to name a few.
  • The largest class file is GB18030.class of the sun.nio.cs package.
  • The smallest class file is Remote.class of the java.rmi package.
  • 7,232 classes are less than 1 KB
  • Only 291 classes are more than 50 KB and only 26 above 100 KB
  • All class files have the same timestamp

The longest and smallest file names

The longest and smallest file names

In terms of code conventions, many classes in the JDK start with a lowercase or contain an underscore in their name. The most common is module-info.class.

The Evolution

The JDK history in statistics, based on the different JDK installed on my computer:

  • The largest JDK release is JDK 9 with 500 MB
  • The smallest release post JDK 8 is JDK 17 with 297 MB
  • 26,671 classes in JDK 17
  • 30,704 classes in JDK 11

One of the surprises of this analysis is that there are fewer classes in JDK 20 than in JDK 11. One of the reasons is the fact that Nashorn and rmic modules have been removed.

Java Development Kit Statistics

Opinions expressed by DZone contributors are their own.

Related

  • Alternative Structured Concurrency
  • Optimizing Java Applications for Arm64 in the Cloud
  • JDK 17 Memory Bloat in Containers: A Post-Mortem
  • Understanding Table Statistics in SQL Server: Importance, Performance Impact, and Practical Examples

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook