SpringSource导入的想法。但有一个错误"未识别的VM选项'MaxMetaspaceSize=1024m' "

时间:2021-04-26 17:21:10

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

我想把spring框架引入IDEA。我遵循了文档,运行了下面的命令,但是我有一个错误:

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 :

我的操作系统是这个主题。JDK版本如下:

>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

3 个解决方案

#1


9  

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

正如@VMN所说,MaxMetaspaceSize在Java 8中得到支持,并且有bug。

You can try one of this:

你可以试试这个:

1)Download JDK8 and set it to you environment.

1)下载JDK8并将其设置为您的环境。

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

2)编辑gradlew.bat(windows)或gradlew(linux),删除VM选项MaxMetaspaceSize。

#2


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.

我犯了同样的错误。导致错误的原因是Java 8选项“MaxMetaspaceSize=1024m”,在早期版本中不支持。Spring开发人员在主分支中使用这个选项。切换到3.2。成功导入x分支项目。

#3


0  

You have three choice to slove this problem

你有三个选择来解决这个问题。

1)use JDK8 as your enviroment;

1)使用JDK8作为环境;

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

2)忽略或删除“set GRADLE_OPTS=-XX:MaxMetaspaceSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%”

3)choose another branch like 3.2.x

3)选择另一个分支,如3.2.x。

#1


9  

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

正如@VMN所说,MaxMetaspaceSize在Java 8中得到支持,并且有bug。

You can try one of this:

你可以试试这个:

1)Download JDK8 and set it to you environment.

1)下载JDK8并将其设置为您的环境。

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

2)编辑gradlew.bat(windows)或gradlew(linux),删除VM选项MaxMetaspaceSize。

#2


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.

我犯了同样的错误。导致错误的原因是Java 8选项“MaxMetaspaceSize=1024m”,在早期版本中不支持。Spring开发人员在主分支中使用这个选项。切换到3.2。成功导入x分支项目。

#3


0  

You have three choice to slove this problem

你有三个选择来解决这个问题。

1)use JDK8 as your enviroment;

1)使用JDK8作为环境;

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

2)忽略或删除“set GRADLE_OPTS=-XX:MaxMetaspaceSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%”

3)choose another branch like 3.2.x

3)选择另一个分支,如3.2.x。