On 20/05/2016 18:02, Aleksey Shipilev wrote:
:
-Xmodule:jdk.unsupported definitely works, thanks!
What are the drawbacks for enabling this? I can easily enable that
globally for the entire project, but that would compile all project
files as if in the jdk.unsupported module? I guess that does not matter
if I don't produce/deploy the module as the build artifact.
It would compile everyone as if part of this module. That module
currently exports all its packages so there isn't a risk that you
successfully compile with a reference to a type in a non-exported package.
Also are you compiling jdk.internal.annotations.Contended too? That is
in java.base.
(Aside: by reading the javac source code, I discovered -XDnoModules,
which also works, but hidden, unsupported, fragile, and scary)
Jon has it on the list to remove, see JDK-8152785.
-Alan