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

3

6

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
Joachima answered 25/6, 2013 at 7:30 Comment(2)
what's you jdk version?Briant
``` >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 ```Joachima
B
9

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.

Briant answered 25/6, 2013 at 23:33 Comment(1)
In case you are configuring WildFly, remove option from installation file.Homophonous
C
1

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.

Colicroot answered 25/6, 2013 at 21:12 Comment(0)
P
0

You have three choice to slove this problem

1)use JDK8 as your enviroment;

2)ignore or delete "set GRADLE_OPTS=-XX:MaxMetaspaceSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%" in gradle.bat;

3)choose another branch like 3.2.x

Phthisis answered 19/11, 2013 at 6:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.