Import SpringSource into IDEA. But there was an error "Unrecognized VM option" MaxMetaspaceSize = 1024m "

I want to import Spring-framework into IDEA. I followed the document and executed the following command, but I had an 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. The JDK version is as follows:

 >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 
+6
source share
3 answers

As @VMN said, MaxMetaspaceSize is supported in Java 8 and has errors .

You can try the following:

1) Download JDK8 and install it in the environment.

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

+9
source

I had the same error. The cause of the error is in the Java 8 option "MaxMetaspaceSize = 1024 m", which is not supported in earlier versions. Spring developers use this option in the main branch. After the transition to the project, branches 3.2.x were successfully imported.

+1
source

You have three options for solving this problem.

1) use JDK8 as your environment;

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

3) select another branch, for example 3.2.x

0
source

Source: https://habr.com/ru/post/948040/


All Articles