Use of JCP site is subject to the
JCP Terms of Use and the
Oracle Privacy Policy
|
JSRs: Java Specification Requests
JSR 376: JavaTM Platform Module System
Original Java Specification Request (JSR)
Identification |
Request |
Contributions
Section 1. Identification Submitting Member: Oracle Name of Contact Person: Mark Reinhold E-Mail Address: mark.reinhold Telephone Number: +1 408 276 7256 Fax Number: - Specification Lead Member: Oracle America, Inc. Specification Leads: Mark Reinhold E-Mail Address: mark.reinhold Telephone Number: +1 408 276 7256 Fax Number: - Initial Expert Group Membership: Tim Boudreau Supporting this JSR:
Tim Boudreau Section 2: Request
2.1 Please describe the proposed Specification:This JSR will define an approachable yet scalable module system for the Java Platform. It will be approachable, i.e., easy to learn and easy to use, so that developers can use it to construct and maintain libraries and large applications for both the Java SE and Java EE Platforms. It will be scalable so that it can be used to modularize the Java SE Platform itself, and its implementations. 2.2 What is the target Java platform? (i.e., desktop, server, personal, embedded, card, etc.)Java SE, for use on embedded devices, laptops, desktops, and servers. 2.3 The Executive Committees would like to ensure JSR submitters think about how their proposed technology relates to all of the Java platform editions. Please provide details here for which platform editions are being targeted by this JSR, and how this JSR has considered the relationship with the other platform editions.This JSR targets Java SE 9. We expect the module system to be leveraged by Java EE 9, so we will make sure to take Java EE requirements into account. This JSR will only define a module system. It will not authorize the modularization of the Java SE Platform, any other Java Platform Edition, or any other JSR. Such changes are beyond the scope of this JSR and must be carried out in some other, related JSR. We expect the modularization of the Java SE Platform to defined in the Java SE 9 Platform Umbrella JSR. 2.4 What need of the Java community will be addressed by the proposed specification?The proposed specification will address two fundamental needs of large Java applications: Reliable configuration and strong encapsulation.
By addressing these needs, the proposed specification will enable three further points of value for the Java community:
2.5 Why isn't this need met by existing specifications?The relevant existing specification in this space is JSR 291, which established the OSGi Service Platform R4 Core Specification in the JCP. OSGi is a rich and powerful dynamic-component framework which includes a module system, a life-cycle model, and a service registry. OSGi addresses the problem of reliable configuration but, since it builds on top of the Java SE Platform, it does not provide strong encapsulation. We intend in this JSR to consider changes to the Java programming language, the Java virtual machine, and the Java SE APIs so as to address all the needs listed above with improved usability, diagnosability, security, and performance. OSGi’s life-cycle and dynamic service-registry facilities are useful to some kinds of sophisticated applications but are beyond the scope of the needs outlined above. Those who require these facilities will still be able to run OSGi on top of Java SE 9 implementations. 2.6 Please give a short description of the underlying technology or technologies:A Java program component is organized as a set of packages. With a module system the packages of a component are grouped into a module that governs how they use other modules, and how other modules use them. Modules are building blocks that allow an application to be composed from a set of components independently of the details of their implementations. A module is a named set of packages, resources, and native libraries. To control how its packages use other modules, a module declares which other modules are required in order to compile and run the code in its packages. To control how other modules use its packages, a module declares which of its packages are exported, and which are not. The module system locates required modules from the universe of observable modules and, unlike the class-path mechanism, ensures that different modules containing packages of the same name do not interfere with each other. The module system loads the code of required modules on behalf of the Java compiler or the Java virtual machine. After loading, the access-control mechanism of the Java language and the JVM prevents code from accessing packages that are not exported by their modules. To reduce coupling between modules, a module may declare that it uses an
interface whose implementation will be provided at run time by some module.
The module system binds implementations to interfaces and makes these
bindings available via the existing The module system will provide the means for a platform to which it is applied, e.g., Java SE or Java EE, to run existing libraries and applications without change, so long as such components use only standard platform APIs. Some members of the Java community have already invested significantly in applications and frameworks built on top of the OSGi Service Platform. The module system will provide a means for an OSGi kernel to locate Java modules and resolve them using its own resolver, except possibly for core system modules. This will enable OSGi bundles running in such a kernel to depend upon Java modules. The module system will, finally, satisfy the additional relevant requirements in the document Project Jigsaw: Goals & Requirements, as amended and agreed by the Expert Group. 2.7 Is there a proposed package name for the API Specification? (i.e., javapi.something, org.something, etc.)
The module-system API will reside primarily in the new package
2.8 Does the proposed specification have any dependencies on specific operating systems, CPUs, or I/O devices that you know of?No. 2.9 Are there any security issues that cannot be addressed by the current security model?The foundations of the current security model are adequate, but the model will need to be extended so as to associate protection domains with modules. 2.10 Are there any internationalization or localization issues?We expect the module system to provide a means to include localization data
in modules so that it can be accessed via the existing
2.11 Are there any existing specifications that might be rendered obsolete, deprecated, or in need of revision as a result of this work?The Java Language Specification, the Java Virtual Machine Specification, and other elements of the Java SE Platform Specification will be revised by this JSR. JSRs 277 (Java Module System) and 294 (Improved Modularity Support in the Java Programming Language) will be superseded by this JSR, and hence will be withdrawn. 2.12 Please describe the anticipated schedule for the development of this specification.
Expert Group formation: December 2014 2.13 Please describe the anticipated working model for the Expert Group working on developing this specification.The Expert Group will work exclusively via e-mail, using a publicly-readable mailing list. 2.14 Provide detailed answers to the transparency checklist, making sure to include URLs as appropriate:
2.15 Please describe how the RI and TCK will de delivered, i.e. as part of a profile or platform edition, or stand-alone, or both. Include version information for the profile or platform in your answer.The RI and TCK will be part of the RI and TCK for Java SE 9. 2.16 Please state the rationale if previous versions are available stand-alone and you are now proposing in 2.13 to only deliver RI and TCK as part of a profile or platform edition (See sections 1.1.5 and 1.1.6 of the JCP 2 document).(Not applicable.) 2.17 Please provide a description of the business terms for the Specification, RI and TCK that will apply when this JSR is final.The licenses for the specification and the TCK are attached. The RI will be made available under the GNU General Public License, version 2, with the Classpath Exception.
2.18 Please describe the communications channel you have established for the public to observe Expert Group deliberations, provide feedback, and view archives of all Expert Group communications.We intend to implement a trio of mailing lists in an approach already used by earlier JSRs, including that for Java SE 8 (JSR 337):
The archives of all of these lists will be publicly readable. 2.19 What is the URL of the Issue Tracker that the public can read, and how does the public log issues in the Issue Tracker?We intend to use the OpenJDK bug system at http://bugs.openjdk.java.net. The OpenJDK bug system is writable only by OpenJDK Contributors. Others may log issues into that system by sending feedback to the “comments” list, or by submitting issues via bugs.java.com. 2.20 Please provide the location of the publicly accessible document archive you have created for the Expert Group.http://openjdk.java.net/projects/jigsaw/spec/ Section 3: Contributions
3.1 Please list any existing documents, specifications, or implementations that describe the technology. Please include links to the documents if they are publicly available.This JSR is a central component of Project Jigsaw, a long-running effort in the OpenJDK Community to design and implement a standard module system for the Java SE Platform and to apply that system to the Platform itself and to its Reference Implementation, the JDK. Relevant documents include:
3.2 Explanation of how these items might be used as a starting point for the work.The detailed goals and requirements of the overall modularization effort have been discussed publicly for many years. They were most recently refined and documented in the above-mentioned Goals & Requirements document, which was published and discussed in July 2014. Expert Group members are expected to be familiar with that document and agree, in principle, with its stated goals and constraints. The EG will begin its work by reviewing the requirements in that document relevant to the module system and, if necessary, proposing and agreeing upon revisions thereto. An initial specification and prototype implementation intended to meet the revised requirements will then be provided by the Specification Lead to serve as the starting points of this JSR’s Specification and Reference Implementation. Related work described in the aforementioned JEPs and earlier work done in the exploratory phase of Project Jigsaw may further inform the EG’s discussions. |