Intellij IDEA中的Maven导入在大型项目中耗尽内存 [英] Maven import in Intellij IDEA runs out of memory on a large project
本文介绍了Intellij IDEA中的Maven导入在大型项目中耗尽内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Maven项目的导入结束于
异常java.lang.OutOfMemoryError:GC开销限制超过
- 我试图定义一个环境变量:
MAVEN_OPTS = -Xmx1g
。 - 我试图通过设置 - >构建工具将
-Xmx1g
添加到Maven VM选项 - > Maven - > Runner。
没有成功。我还能做什么?
解决方案
解决方法是设置 -Xmx1g
(或更多)
了解有关JVM堆大小的更多信息:(Q)什么是 Xms
和 Xmx
参数?。
Import of Maven project ends with
Exception java.lang.OutOfMemoryError: GC overhead limit exceeded
- I've tried to define an environment variable:
MAVEN_OPTS = -Xmx1g
. - I've tried to add
-Xmx1g
to Maven VM options via Settings -> Build Tools -> Maven -> Runner.
Without success. What else can I do?
解决方案
The solution is to set -Xmx1g
(or more) in Maven VM options for importer (yes, it is a separate option!). Go to "Settings -> Build Tools -> Maven -> Importing", and find the option there.
Read more on JVM heap size: (Q) What are the Xms
and Xmx
parameters when starting JVMs?.
这篇关于Intellij IDEA中的Maven导入在大型项目中耗尽内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文