[GRADLE-3256] Gradle daemon does not support JDK 9 by default Created: 05/Mar/15  Updated: 22/Aug/15  Resolved: 22/Aug/15

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 2.7-rc-1

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Fixed Votes: 0


 Description   

After installing JDK 9 (build 1.9.0-ea-b53) on my Mac, the Spring Framework build fails with the following error:

Unrecognized VM option 'MaxPermSize=256m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

However, the Spring Framework build does not set the MaxPermSize JVM argument.

It appears that DaemonParameters is the culprit since it sets default JVM arguments that are incompatible with JDK 9.

Adding the following to gradle.properties serves as a temporary work around:

org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m -Xmx1024m

However, I would consider this a bug.

Gradle's DaemonParameters should detect that the current JDK is greater than 1.8 and set the default JVM arguments accordingly.


Generated at Wed Jun 30 12:44:04 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.