Unable to make field private static final java.util.Map java.lang.ProcessEnvironment.theCaseInsensitiveEnvironment accessible: module java.base does not “opens java.lang” to unnamed module @2c039ac6

I’ve had a similar problem with an old BungeeCord plugin, which used Gradle 4.10. In my case – it seems like that old Gradle doesn’t work properly with Java 16, so I’ve manually changed contents of gradle/wrapper/gradle-wrapper.properties file to use Gradle 7.0.

Old file:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip

New file:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip

Now it works ok, no more Gradle errors.



Leave a Reply