OpenJDK 10 and Oracle JDK10 doesn't have the same default modules
Christian Stein
sormuras at gmail.com
Sun Feb 4 12:45:59 UTC 2018
On Sun, Feb 4, 2018 at 1:38 PM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:
> On 04/02/2018 11:30, Remi Forax wrote:
>
>> Hi all,
>> it seems that the OpenJDK 10 and OracleJDK 10 doest not declare the same
>> set of default modules, so java --add-modules ALL-DEFAULT do not behave the
>> same way :(
>>
>> With Oracle JDK 10 b42, module java.scripting is part of the default
>> modules
>> https://travis-ci.org/sormuras/beautiful_logger/jobs/337153634
>>
>> With Oracle JDK 10 b42, module java.scripting is NOT part of the default
>> modules,
>> so javax/script/ScriptException is not found
>> https://travis-ci.org/sormuras/beautiful_logger/jobs/337153635
>>
>> Should not ALL-DEFAULT mean the same set of default modules for a JDK
>> release ?
>>
>> These Travis jobs seem to be using ALL-MODULE-PATH (not ALL-DEFAULT) so I
> don't think this is anything to do with the set of modules to resolve when
> running code on the class path.
>
> The NCFE appears to thrown by code in module org.junit.juniter.engine. If
> this an explicit module and it contains code with a reference to a class in
> java.scripting then it needs `requires java.scripting`, otherwise it will
> not compile or tun. Maybe it's an automatic module and so needs
> --add-modules to resolves the modules it depends on?
>
>
>
It's an automatic module. And it does run "as-is" on Oracle JDK,
using ALL-MODULE-PATH.
Here is the actual command:
java
--module-path
bin/bach/target/classes/test:bin/bach/modules
--add-modules
ALL-MODULE-PATH
--module
org.junit.platform.console
--scan-modules
Perhaps the interpretation of " ALL-MODULE-PATH " by Oracle JDK is too
generous, as it add all system modules as well?
More information about the jigsaw-dev
mailing list