Solving the monolithic runtime

There is a distinct advantage of knowing which platform modules your application belongs to. It is a clear indication of which platform modules it doesn't need--which is anything the modules in the application doesn't use! So, for example, if your application contains modules that only require the platform modules java.base and java.logging, you can essentially create a small subset of the Java platform consisting of just those two modules. That slice of the platform is all that your application needs to function. If you are bundling the runtime with your application, you now know the exact portion of the runtime you need to bundle, no more no less!

Java 9 comes with a brand-new static linking step that lets you create custom runtime images with only the modules that your applications need. This results in smaller and leaner application distributable, micro-service executables, and so on. You'll learn more about the linking phase and how to create your own runtimes in Chapter 8, Understanding Linking and Using jlink.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.170.134