Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 293
diguage Avatar asked Jun 25 '13 07:06

diguage


2 Answers

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.

like image 172
lichengwu Avatar answered Oct 20 '22 10:10

lichengwu


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.

like image 29
VMN Avatar answered Oct 20 '22 10:10

VMN