Gradle with Java9 b149 throws ExceptionInInitializerError


(Kengo TODA) #1

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 InaccessibleObjectException.

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.

Thanks in advance,
Kengo TODA