编译 Spring-framework的经验分享

Spring-framework source code
git url: git clone git://github.com/SpringSource/spring-framework.git

导入IDE
Run ./import-into-eclipse.sh or read import-into-idea.md as appropriate.
启动 ./import-into-eclipse.sh 时,出现如下错误

Unrecognized VM option ‘MaxMetaspaceSize=1024m’
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

这是因为”MaxMetaspaceSize=1024m” 这个参数配置只出现在jdk 8中,默认情况下是在master分支下,猜测是基于jdk 8开发。

所以有三个选择:
1. 切换到其他分支,如3.2.X
2. 安装jdk8
3. 编辑gradlew.bat,移去VM option MaxMetaspaceSize.

posted @ 2014-10-24 03:08  wuhn  阅读(568)  评论(0编辑  收藏  举报