javac --module-source-path and --patch-module do not work together

Remi Forax forax at univ-mlv.fr
Wed Nov 2 14:14:56 UTC 2016


Hi Jon, hi all,

When i try to compile a module with --module-source-path that uses a patched class (with --patch-module),
it fails.

With:
javac --module-source-path src \
      -d output/modules/ \
      --patch-module java.base=output/classes \
      --module-path output/modules \
      $(find src/org.hibernate.jpa/ -name "*.java")

it seems that javac tries to find the source of the patched module (here java.base) in the module-source-path,
so it get this error

error: cannot find module: java.base
1 error

I believe this is a bug.

Step to reproduce it:
git clone git at github.com:forax/access-broker.git
and uncomment the lines that uses --module-source-path and --patch-module java.base=output/classes in the build.sh.

regards,
Rémi


More information about the jigsaw-dev mailing list