I note the discussions on various threads about JPMS primitives. My first expectation is that OSGI and JBoss modules can run in Java 9 in classpath mode.
I believe this to be true today. My second expectation is that there are sufficient primitive operations within JPMS to allow a _new_ module system (not OSGI or JBoss Modules) to be built that permits some but not all of the features seen in OSGI and JBoss Modules. Thes should include: - dynamic loading/reloading of modules - lifecycle callbacks - multiple versions of a class loaded at the same time - handling of clashing packages - some form handling for module cycles It is clear to me that JPMS does contain an API with some flexibility here, but it is hard to judge whether my second expectation is met. This is because the discussion is ledf by OSGI and JBoss Modules migration concerns, rather than by consideration of what a new module system would need. Perhaps these concerns are the same, perhaps not. I would like to see a discussion from the EG about what blocks a theoretical new extended module system built on top of JPMS. Specifically, I note Thomas Watson's concern over non-lazy class loader construction as being a concern [1] (point 2) for module systems. My third expectation is that it should be possible for bytecode/class generation tools to generate code inside a module, including in a package that is not known by the module graph. I note that Proxy appears to have a special case for "dynamic modules", and am concerned that this may over-emphasise Proxy compared to other similar tools that are not part of the JDK. Note that while I understand the desire for OSGI and JBoss Modules to fit into JPMS and get the benefits, I do not consider that necessary to complete the JSR - it is more important to close out Java 9 and move on. These existing systems work today, and provide benefits today, something that won't change. That they won't get the enhanced security benefits of JPMS modules is a secondary concern IMO. Stephen [1] http://mail.openjdk.java.net/pipermail/jpms-spec-observers/2017-March/000801.html