As we know, Java 9 was released in late September.In this article, we will be discussing about Java 9 new modularity features, different tools which are ready for java 9 new modularity features along with tools which are not ready for java 9 new modularity features. Lets get started.
With the release of Java 9, it went modular to improve its scalability and performance. Modularity is a general concept. In software, it applies to writing and implementing a program or computing system as a number of unique modules, rather than as a single, monolithic design. With the help of Modularity, programmers can do functionality testing in isolation and involve in parallel development efforts during a given sprint or project. This escalates efficiency throughout the entire software development lifecycle.
But not all tools of java support its modularity feature. This article provides an overview of features which supports Java Modularity and it gives list of tools which support java 9’S new modularity features.
Java 9 is unique because of the introduction of modular components and segments throughout the entire JDK.The primary features supporting modularization are:
Modular Source Code- JRE and JDK will be rearranged into interoperable modules in Java 9. This will support the creation of scalable runtimes that can be executed on small devices.
Build-time enforcements–In Java 9, the build system will beimproved, via JEP 201, to compile and enforce module boundaries.
Deployment facilities- Tools will be provided within the Jigsaw project that will support module boundaries, constraints, and dependencies at deployment time.
Segmented code cache–It is not a strict modular facility; however, the new segmented code cache of Java 9 will follow the spirit of modularization and enjoy some of the same benefits.
Apache Ant is a java library and command line tool which is used in building Java applications. The Ant project management committee had earlier ensured that Ant will works on Java 9 with the February 2017 Ant 1.10.1 release. It is up to speed for Java 9 and modularity.It supports module path and related options to the javac, java, and junit tasks.
Apache Maven version 3.7 supportsJava 9 and modularity.
Eclipse IDE is an open source tool which supports Java 9 as of June 2017’s Oxygen release. However, to work with Java 9 modules, Java developers need to add the following vmargs (command-line parameters for the JVM) to eclipse.ini: —add-modules=ALL-SYSTEM.A project might fail to run because types are being used that are neither in java.base or java.se.ee, such as types from javafx.Base. In that case, you have to figure out which modules you need to add with —add-modules, according to the Eclipse documentation.
JetBrainsIntelliJ Idea IDE
As of version 2017.2, the popular IntelliJ Idea IDE has full support for Java modularity. Developers can build a Java 9 modular project, as in one that uses the module path instead of class path. Also supported are development of module-info.java files, as well as code completion and quick fixes for these files.
The Gradle software build tool doesn’t fully support Java 9 yet, though its developers expect it to do so in 2018.In the time being, Gradle-using developers can experiment with modularity through workarounds.
The Jenkins open source automation server used in continuous integration and deployment for software development projects doesn’t yet support Java 9 modularity remain a work in progress. Cloud Bees is leading the effort in the Jenkins community to make Jenkins Java 9-compatible, said project founder Kohsuke Kawaguchi, CTO at Cloud Bees. But he has no approximate date for providing Java 9 compatibility to Jenkins.