I’m using Gradle to build a project, and use both of Oracle Java8 and Oracle Java9 to test.
Previously I can use Gradle 3.2.1 with Oracle Java9 b140, however, it doesn’t work with Oracle Java9 b149. I also confirmed that Gradle 3.3 has the same problem, so I made a minimal project to reproduce problem:
Note that I am using
GRADLE_OPTS to add
--add-opens JVM option to
java command, or I will face another
Currently I’m not sure why daemon process cannot run with
--add-opens JVM option, due to lack of detailed information. Could you tell me how to use Gradle with Java9?
It seems that GitHub issue has several related topic, but they’re not closed yet.
- https://github.com/gradle/gradle/issues/723 (This might be not related with mine, because I could pass build with Oracle Java9 b140)
https://github.com/gradle/gradle/issues/1095 (Its workaround uses
tasks.withType(Test)but this cannot be solution in my case, because Gradle daemon cannot start at all)
Thanks in advance,