Java 9 module plan picks up a packager

25.09.2015
Java modules, in the works for years and now set to debut in 2016, will involve improvements to the Java Packager, to reduce the size of the Java Runtime Environment.

In a JDK Enhancement Proposal (JEP) floated this week on an Internet bulletin board, the Java Packager tool could be integrated with features from the Project Jigsaw modularization plan. Java Packager is used to compile, package, and deploy Java applications from the command line.

“The Java Packager has always generated huge binaries when it is asked to bundle a runtime as part of its packaging due to the size of the JRE, which for some distributions is on the order of 100MB,” the proposal states. “Jigsaw will expose tools and techniques that can reduce the size of the JRE we need to package.”

The proposal stipulates that, for the most part, packager workflow will remain as is. But tools from Jigsaw will be added and replace some steps. The packager will only create applications using the JDK 9 runtime, which will simplify code paths, according to the proposal. Users who want to create a Java 8 application still can use the Java Packager that shipped with Java 8. The JEP proposal, officially numbered JEP 275, was initially developed in mid-May but was updated on Thursday, although the week's specific update was not noted in the document.

Initially proposed for inclusion in Java 8, which was released in March 2015, modularization was delayed until Java 9, due in a year. In a recent blog post, Oracle's Mark Reinhold, chief architect of the company's Java platform group, talked about the goals of a module system, which include reliable configuration and strong encapsulation, enabling scalability and improved performance.

The JEP depends entirely on Project Jigsaw. This project, the JEP proposal states, introduces the notion of module-path in addition to a classpath. “New options and configurations will be added to the packager API, Ant plugin, and CLI to allow the user to specify modules and module paths, in addition to JARs and classpaths. This may require additions to existing app-resource handling.”

(www.infoworld.com)

Paul Krill

Zur Startseite