
I made a Java module out of the ANTLRv3 runtime, and made it into a
modular jar, as follows:

Started with antlr-runtime-3.5.2.jar, downloaded from antlr.org.

mkdir antlr3runtime
cd antlr3runtime
cp /path/to/antlr-runtime-3.5.2.jar .
tar xf antlr-runtime-3.5.2.jar

Create file module-info.java with this contents:

module antlr3runtime {
    exports org.antlr.runtime;
    exports org.antlr.runtime.tree;
    exports org.antlr.runtime.misc;
    exports org.antlr.runtime.debug;
}

javac -d . --module-path . module-info.java

This created module-info.class.    Get rid of module-info.java:

mv module-info.java ..
cd ..
jar --create --file=antlr3runtime.jar -C antlr3runtime .

Now you have a module named antlr3runtime which can be used in other
modular Java projects via this jar.

Note: java was unhappy with the name antlr3.runtime because of
"terminal digits" in the name.
