What are the advantages and disadvantages of the Module System in Java 9?


A major change in Java 9 version is Module System, and it provides modular JVM that runs on devices with less available memory. The JVM runs with only those modules and API required by an application.

module Module-Name {
   requires moduleName;
   exports packageName;
}

Below are some of the advantages and disadvantages of the Module System.

Advantages of Module:

  • The main change in Java 9 is that it is now a module system with a modular JDK, modular source code, and modular run-time images.
  • Internal APIs are hidden in a module.
  • A module system creates more opportunities for the development of projects that can be dealing with distributed data processing. For instance, new Java 9 has been applied for building IoT solutions and platforms where it is necessary to process various data concurrently.
  • The modules in Java now also make methods public inside a module and restrict access for common users.

Disadvantages of Module:

  • After Java 9 release, previous versions of Java no longer be supported, and clients can have to spend time and resources on migration.
  • If a project is still in the development phase, it won’t be too difficult. But the migration can be a serious problem for other solutions.
  • The problem of the interdependency of program products and libraries has not been solved yet, making installing new products and uninstalling old ones can be difficult.

raja
raja

e

Updated on: 15-Apr-2020

846 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements