指定的初始和最大堆大小不兼容 [英] Incompatible initial and maximum heap sizes specified
本文介绍了指定的初始和最大堆大小不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我运行具有NLP库的java类时出现此错误....
I got this Error when I run a java class which has an NLP library ....
Error occurred during initialization of VM
Incompatible initial and maximum heap sizes specified
任何想法如何解决此错误:)
any idea how i can solve this error :)
推荐答案
您应该注意,如果将初始堆大小设置为大于最大堆大小,应用程序将产生此类错误
You should note that in case of setting initial heap size bigger than maximum one, application will produce such error
-Xms
表示初始堆大小
-Xmx
表示特定JVM的允许的最大堆大小
-
java -Xms128m MyClass
- 错误,因为默认最大堆大小可能低于128米
- 更好,因为初始大小等于或高于最大值
在这里阅读更多 http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html
也很有用,要理解这两个论点,如果你有兴趣,请在这里阅读更多内容:
And useful is too, to understand those two arguments, read more here if you're interested:
Java的-Xms和-Xmx选项的速度权衡
启动JVM时Xms和Xmx参数是什么?这篇关于指定的初始和最大堆大小不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文