On 11/06/2017 08:57, Nicolai Parlog wrote:
:

With --patch-module I get the same errors as without:

javac --module-path mods -d classes \
        --patch-module monitor.rest=mods/monitor.rest.jar \
        monitor.rest/src/main/java/monitor/rest/MonitorServer.java
I agree the documentation needs improvement. JEP 261 needs a big update and one of the items that needs to be properly describes is `javac --patch-module`.

The main thing to understand with `javac --patch-module` is that you can specify the source location (it's more powerful than the --patch-module support as run-time). In this example then I would expect this should work:

  javac --modulepath mods -d classes \
    --patch-module monitor.rest=monitor/src  \
    monitor.rest/src/main/java/monitor/rest/MonitorServer.java

The already compiled monitor.rest will be found on the module path.

-Alan.

Reply via email to