TheModulesProject is inactive. The approach described here was supersededbyProject Jigsaw.
This page covers the implementation of the modularityspecifications defined by JSR 277 and JSR 294 as well as therelated work in the JDK. It is targeted for inclusion in JDK 7.
Superpackages are a new language construct for informationhiding that is being defined by JSR 294, and it defines thelinguistic unit of modularity in the Java programming language. TheJava Module System defined by JSR 277 builds on top of that bydefining the deployment unit of modularity; it adds the versioningscheme, distribution format, repository and the comprehensiveruntime architecture for the deployment of module-basedapplications and libraries. In addition to the specificationsdefined by JSR 277 and JSR 294, other parts of the JDK will beupdated to take advantage of the new features, for example the Javalauncher program (bin/java
), thejava.util.ResourceBundle API, the java.util.ServiceLoader API,etc.
The Modulesproject hosts the referenceimplementation of the new core functionality and serves as anumbrella for other related work items developed by other OpenJDKgroups.
Early access source code is now available from theOpenJDK download site.Please read the notes below and check out thedocumentation.
Note that this is a live snapshot of the ongoing developmentproject before it is integrated into the main OpenJDK source tree.At this time, the code may not be as stable or complete as the restof OpenJDK. It is made available to allow all members of OpenJDKcommunity to collaborate in the development process and to allowfor early feedback from interested observers.
The implementation project tracks the specifications developedby JSR 277 and JSR 294. However, it may sometimes be out-of-syncwith those specifications. At times it may lag behind them orcertain features may not be implemented. At other times theimplementation may prototype features to explore their feasibilitybefore they are added to the specifications.
Features
Currently implemented:
- Implementation of the classes in java.module
- Module initialization and class loading
- LocalRepository and URLRepository core functionality
- Launching modules using the
java
command- Prototype
jam
packaging toolNot yet implemented:
- See the daily bug list emails on themodules-dev list
JSR 277earlydraft (October 2006, new draft expected soon)
JSR 277 APIs. The source for thejava.module
package is available under the directorysrc/share/classes
in theimplementationsources.
JSR 294 superpackagestrawman
JSR 294expertgroup mailing list and archive.
JSR 294 reflective APIs. The sources for the classjava.lang.reflect.Superpackage
as well as the proposedupdates tojava.lang.Class
andjava.lang.ClassLoader
are available under thedirectorysrc/share/classes
in theimplementation sources. Also available are the updatesto thejavax.lang.model
APIs that will be made by amaintenance revision ofJSR 269.
Getting started with theModules project
Sample modules
modules-dev@openjdk:Technical discussion about the implementation of the modulesproject
modules-discuss@openjdk:General discussion of the modules project and how to usemodules