In Chapter 1, Introducing Java 9 Modularity, we examined the large size of the JDK, both in terms of the file size of rt.jar as well as the number of classes that are bundled in it. Typically, you wouldn't think about the JDK when developing Java applications. Once you've installed the JDK on your development machine, it sits in a remote corner of your hard disk at $JAVA_HOME and it doesn't bother you. There are, however, a few instances where you would need to worry about the size of the JDK, especially when bundling an application executable. Here are a couple of such occasions:
- Runtime bundles for embedded devices: Java has been known to run on portable and embedded devices, such as compact music players, microwaves, and washing machines. Many of these are devices with scarce hardware capacities for memory and processing power...