Oracle JDK 9 has a lot in it. Some of the features are performance improvements such as compact strings.
Some are tooling improvements like the search box in Java doc that Mark showed in the keynote and the new J shell tool.
Some of course on this vast list are updates to existing features such as support for Unicode 8, but the main feature and the one that's taken
many years to come to fruition is the Module System.
What is a Module
Modularity adds a higher level of aggregation above packages. The key new language element is the module, which is a uniquely named, reusable group of related packages, as well as resources (such as images and XML files) and a module descriptor specifying
the module's name
the module's dependencies (that is, other modules this module depends on)
the packages it explicitly makes available to other modules (all other packages in the module are implicitly unavailable to other modules)
the services it offers
the services it consumes
to what other modules it allows reflection
Which Components make up the Java 9 Module System
The Java 9 module system consists of the following components:
Module declaration: A module is a named, self-describing collection of code and data. Each module has its own module descriptor (module-info.java), which declares its name, dependencies, and other information.
Module path: The module path is a new feature in Java 9 that replaces the classpath. It is a list of directories and JAR files that contain the modules that are available to the Java Virtual Machine (JVM).
Modules and the module graph: The module graph is the set of all modules and their dependencies. The JVM uses this graph to determine which modules are visible to other modules, and to resolve any conflicts that may arise due to overlapping packages.
Encapsulation: Modules can encapsulate their internal implementation details, making them inaccessible to other modules by default. This allows for better encapsulation and encapsulation of internal implementation details.
Services: The module system allows for the use of services, which is a way to allow a module to make some of its functionality available to other modules.
Strong encapsulation: The module system provides strong encapsulation, which means that modules cannot use types that are not exported by other modules, unless they explicitly declare a dependence on them.
Readability: The module system allows for the use of readability, which means that a module can use types from other modules, but not export them.
Services: The module system allows for the use of services, which is a way to allow a module to make some of its functionality available to other modules.
Module System
The module system is a big deal because it enables modular development all the way down the 1)java language and 2) java virtual machine. Understand modules very deeply so that the applications you write and the libraries you consume and even the jdk itself can all be developed, tested, packaged and deployed as modules with clear API's and well protected internals making everyone play by the same modular rules has great benefits for 1) reliability, 2) maintainability and security. So with the theme of modules all the way down in minds
We have 3 three parts.
The first part explains how modules are a long overdue building block in the structure of application code
the second part is about how applications and the libraries they depend on can migrate to modules, that is it is about how you can mix modular and non modular code.
The third part is about the structure of the modular JDK, including some of the compatibility issues that arise from that