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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Going All In On the JVM 25 Virtual Threads
  • I Built a Java Version Manager by Fixing Other Tools' Open Bugs
  • A Spring Boot App With Half the Startup Time
  • Alternative Structured Concurrency

Trending

  • AI Agents and Frontier Models: Insights From The Neuron
  • Kill the Worker, Keep the Research: Build a Recoverable LangGraph Agent on Temporal
  • The Twelve-Factor Agents: Building Production-Ready LLM Applications
  • How to Format Articles for DZone

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Apr. 26, 23 · Analysis
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
4.7K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

  • Going All In On the JVM 25 Virtual Threads
  • I Built a Java Version Manager by Fixing Other Tools' Open Bugs
  • A Spring Boot App With Half the Startup Time
  • Alternative Structured Concurrency

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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