Using Babbler with JDK 9 is not an easy task, since Java 9 comes with JPMS enabled -- hence, all Babbler packages are reported as missing. The problem is that people might like to migrate their projects to Java 9, so even if Babbler stays in JDK 8 there will be problems we have to solve. I tried to get it right without modifying Babbler in a first step, but it is really hell, simply spoken, so I gave up after one hour. We have to modify it and provide some help ontop.
Hence I'd like to propose a plan for Java 9 support:
Step 0 -- New git branch
Step 1 -- In
MANIFEST.MF we provide a new
Automatic-Module-Name entry so the current Babbler JARs will still run on JRE 8 and JRE 9 without any change, but the module name will be fixed right now, so it will not change when later modularizing Babbler. Possibly we can skip this step if all JARs have names exactly reading like the wanted module names (to be checked).
Step 2 -- Provide a public example how to use Babbler in a JDK 9 project. This essentially contains a list of the fixed module names provided in Step 1 and possibly a short exemplary POM.
Step 3 -- While still compiling for JRE 8 using JDK 8 tools, replace
module-info.java compiled using JDK 9 tools (there is a Maven example on the Maven Compiler Plugin web site). Using this step, JRE 8 and JRE 9 will still be able to use Babbler rather unchanged, but we are not forced to build Babbler completely using JDK 9, which might take some time to get it right, apparently.
Step 4 -- Build using JDK 9 tools for target JRE 8, so we can upgrade our build machines without forcing users to upgrade their target runtimes.
Step 5 -- Build using JDK 9 tools for target JRE 9. IMHO this step cannot be done in the Babbler 1.x line, but we have to wait with this step until we start a Babbler 2.x line -- or at least, we have to start that line with this sole commit inside (and possibly more Off-Topics like support for Flows API).