[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-jigsaw-dev
Subject: Re: Combining -Xmodule and --add-reads
From: Alan Bateman <Alan.Bateman () oracle ! com>
Date: 2016-08-23 14:51:19
Message-ID: b247e8e7-862f-cc89-596c-0824a0df5060 () oracle ! com
[Download RAW message or body]
On 23/08/2016 15:23, Sander Mak wrote:
> >
> Thanks Alan, that did the trick. Apparently this behavior changed for javac. \
> Executing the test runs fine without --add-modules on org.junit, though:
> java --patch-module undertest=mod-test \
> --add-reads undertest=org.junit \
> --add-exports undertest/undertest.mytestpackage=org.junit \
> --module-path mods:lib-test \
> --add-modules undertest,hamcrest.core \
> -m org.junit/org.junit.runner.JUnitCore undertest.mytestpackage.WhiteboxTest
>
> (hamcrest.core needs to be added explicitly since it's neither required nor used in \
> --add-reads)
The initial module is org.junit so it will be resolved.
> In any case, the omission of `--add-modules` was hard to debug without an error \
> message pointing out that --add-reads was referencing a non-resolved module.
Right, this is where the javac handling differs and will be exposed once
we have better tests to compare javac + runtime behavior for cases like
this.
-Alan
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic