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
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
.
I had the same error. Cause of error is in Java 8 option "MaxMetaspaceSize=1024m", that not supported in early versions. Spring developers use this option in master branch. After switching to the 3.2.x branch project was successfully imported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With