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