Search code examples
springjvmgradlejvm-arguments

Import SpringSource into IDEA.But had a error "Unrecognized VM option 'MaxMetaspaceSize=1024m'"


I want to import Spring-framework into IDEA. I followed the document, and run the following command, but I had a error:

spring-framework>gradlew.bat :spring-oxm:compileTestJava cleanIdea idea

Unrecognized VM option 'MaxMetaspaceSize=1024m'
Could not create the Java virtual machine.

What's wrong?

My OS is Win7. JDK version is as following :

>java -version
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) Client VM (build 20.13-b02, mixed mode, sharing)

>javac -version
javac 1.6.0_38

Solution

  • As @VMN said, MaxMetaspaceSize is supported in Java 8 and have bugs.

    You can try one of this:

    1)Download JDK8 and set it to you environment.

    2)Edit gradlew.bat(windows) or gradlew(linux), remove the VM option MaxMetaspaceSize.