Posted by admin on 28thaugust 2018
The defining feature for Java 9 is an all-new module system. When codebases grow larger, the odds of creating complicated, tangled “spaghetti code” increase exponentially. There are two fundamental problems: It is hard to truly encapsulate code, and there is no notion of explicit dependencies between different parts (JAR files) of a system. Every public class can be accessed by any other public class on the classpath, leading to inadvertent usage of classes that weren't meant to be public API. Furthermore, the classpath itself is problematic: How do you know whether all the required JARs are there, or if there are duplicate entries? The module system addresses both issues.
This article has been reproduced in a new format and may be missing content or contain faulty links. Contact firstname.lastname@example.org to report an issue.
Modular JAR files contain an additional module descriptor. In this module descriptor, dependencies on other modules are expressed through`requires` statements. Additionally, `exports` statements control which packages are accessible to other modules. All non-exported packages are encapsulated in the module by default. Here's an example of a module descriptor, which lives in `module-info.
problem, however, turned out to be in the simplicity of Berners-Lee's language. Since it was text-based, you could use any editor or word processor to create or convert documents for the Web. And there was just a handful of tags – anyone could master HTML in an afternoon. The Web flourished. Everyone started publishing. The rest is history.
1. The Java Platform module system.
3. JShell: the interactive Java REPL.
4. Improved Javadoc.
5. Collection factory methods.
7. Private interface methods
9. Multi-release JARs.Tag : Java,Programming,java 9