JDK9: define a stable automatic module name with `Automatic-Module-Name` entry in MANIFEST
See original GitHub issueJDK9 is out and introduces a module system.
RxJava does not currently use modules. When we use it in a JDK9 modular application, Java turns the JAR into a so-called automatic module, whose name is derived from the JAR archive name. However, the default name does not follow the recommended module naming conventions (reverse-dns style, module name derived from the main exported package).
It is possible to specify a stable automatic module name through a Automatic-Module-Name
manifest entry, while still targeting JDK8:
Automatic-Module-Name: io.reactivex
Selecting a stable module name is very important, because Java does not allow two modules to own the same package, and you may end up with a module hell. The naming issues are well-explained on Stephen Colebourne’s blog:
- http://blog.joda.org/2017/04/java-se-9-jpms-module-naming.html
- http://blog.joda.org/2017/05/java-se-9-jpms-automatic-modules.html <- the explanation of module hell problem
And the comment of Mike Reinhold, chief Java architect:
Strongly recommend that all modules be named according to the reverse Internet domain-name convention. A module’s name should correspond to the name of its principal exported API package, which should also follow that convention. If a module does not have such a package, or if for legacy reasons it must have a name that does not correspond to one of its exported packages, then its name should at least start with the reversed form of an Internet domain with which the author is associated.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (6 by maintainers)
io.reactivex.rxjava2 would be better.
On Sun, Sep 24, 2017, 11:14 AM Tomasz Jędrzejewski notifications@github.com wrote:
Closing via #5644.