Since the -addmods didn't work from within the options.compilerArgs, I thought I would check if these temporary jdk.launcher ones would work there instead of in _JAVA_OPTIONS. No go with that option.
Also, interesting side note - I have the _JAVA_OPTIONS specified in my .bashrc, so it is picking them up even for my non-JDK9 builds. One of my Android gradle builds, during the dex phase, reported picking up that environment variable probably a hundred times. I can definitely see why that phase of the build is so slow. Malachi de Ælfweald http://www.google.com/profiles/malachid On Wed, Jul 6, 2016 at 8:03 AM, Malachi de Ælfweald <malac...@gmail.com> wrote: > I don't have a problem changing it to the new properties once they work =) > > Actually, that's probably why they didn't work in the gradle configuration. > > > > Malachi de Ælfweald > http://www.google.com/profiles/malachid > > On Wed, Jul 6, 2016 at 7:44 AM, Alan Bateman <alan.bate...@oracle.com> > wrote: > >> >> >> On 06/07/2016 15:30, Malachi de Ælfweald wrote: >> >> I think I must be misunderstanding your suggestion. >> >> If I do: >> export _JAVA_OPTIONS="--add-modules=ALL-SYSTEM --add-exports=java.base/ >> sun.nio.ch=ALL-UNNAMED" >> >> then: >> java -version >> reports: >> Unrecognized option: --add-modules=ALL-SYSTEM >> Error: Could not create the Java Virtual Machine. >> Error: A fatal exception has occurred. Program will exit. >> >> If I do: >> export _JAVA_OPTIONS="-Djdk.launcher.addmods=ALL-SYSTEM >> -Djdk.launcher.addexports.0=java.base/sun.nio.ch=ALL-UNNAMED" >> then: >> java -version >> reports: >> java version "9-ea" >> Java(TM) SE Runtime Environment (build 9-ea+123) >> Java HotSpot(TM) 64-Bit Server VM (build 9-ea+123, mixed mode) >> >> I should have been clearer. We're in the process of cleaning up the new >> options in JDK 9. This work will fix inconsistencies with custom launchers >> and embedded usages too and as part of this, the undocumented/internal >> system properties that Stephen showed you will go away. So what you have is >> okay to get you going but you will need to change this once these issues >> have been sorted out. >> >> -Alan >> > >