5 May 2017

East Africa: Oracle Rethinks Modular Java Plan After Red Hat's Objections

Oracle's chief Java architect has proposed tweaks to Java's modular plan. The revisions were said to be not in response to recent objections by Red Hat and IBM, but they do appear to address one of the concerns.

In a post to an openjdk mailing list on Thursday, a proposal by Oracle's Mark Reinhold, chief architect of the Java platform group, centers on an "AutomaticModuleNames" feature. He also referenced the plan on his twitter feed, tweeting, "Module names should be reverse-DNS and so automatic modules can be given stable names." An Oracle representative said the proposal was just ongoing work on issues that continue to be under discussion and was separate from Red Hat and IBM's issues.

[ The big 4 Java IDEs reviewed: See how Eclipse, NetBeans, JDeveloper, and IntelliJ IDEA stack up. | Keep up with hot topics in programming with InfoWorld's App Dev Report newsletter. ]

Summarizing the issue in Thursday's proposal, Reinhold mentioned revising the algorithm that computes the name of automatic modules to include the Maven group identifier when available in a JAR file's 'pom.properties' file. This way, module names "are less likely to collide, or else drop the automatic-modules feature entirely, since it may be more trouble than it's worth." He then proposes not dropping the automatic modules feature, calling it a critical part of migration, aiding developers in modularizing code.

Reinhold suggests a JAR-file manifest attribute, 'Automatic-Module-Name', whose value is used as the name of the automatic module defined by that JAR file when placed on the module path. Reinhold also recommends that all modules be named according to the reverse Internet domain-name convention. He wants developers to be aware of risks of publishing, for broad use, explicit modules that require automatic modules. "An automatic module is unreliable, since it can depend on types on the class path and its name and exported packages could change if and when it's converted into an explicit module," Reinhold said. "It's fine to declare and use explicit modules that require automatic modules in limited settings."

Modularity is set to be the big feature of Java Development Kit (JDK) 9 due on July 27. But another Oracle official this week acknowledged that the complaints about modularity could actually delay the release of JDK 9, or, simply, Java 9.

East Africa

Africa Needs to Act Now to Safeguard the Health of its Youth

Partnerships and stronger collaboration are critical for better access to quality, affordable healthcare for everyone in… Read more »

Copyright © 2017 CIO East Africa. All rights reserved. Distributed by AllAfrica Global Media (allAfrica.com). To contact the copyright holder directly for corrections — or for permission to republish or make other authorized use of this material, click here.

AllAfrica publishes around 900 reports a day from more than 150 news organizations and over 500 other institutions and individuals, representing a diversity of positions on every topic. We publish news and views ranging from vigorous opponents of governments to government publications and spokespersons. Publishers named above each report are responsible for their own content, which AllAfrica does not have the legal right to edit or correct.

Articles and commentaries that identify allAfrica.com as the publisher are produced or commissioned by AllAfrica. To address comments or complaints, please Contact us.