指定的初始堆大小和最大堆大小不兼容
当我运行一个具有 NLP 库的 java 类时,我收到此错误...
Error occurred during initialization of VM
Incompatible initial and maximum heap sizes specified
知道如何解决此错误:)
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 :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该注意,如果将初始堆大小设置为大于最大大小,应用程序将产生此类错误
-Xms
表示初始堆大小-Xmx
表示特定 JVM 允许的最大堆大小java -Xms128m MyClass
java -Xms128m -Xmx128m MyClass
在此处阅读更多内容 http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html
也很有用,要了解这两个参数,如果您有兴趣,请在此处阅读更多内容:
Java 的 -Xms 和 -Xmx 选项的速度权衡< br>
启动 JVM 时的 Xms 和 Xmx 参数是什么?< /a>
You should note that in case of setting initial heap size bigger than maximum one, application will produce such error
-Xms
means initial heap size-Xmx
means maximum heap size allowed for particular JVMjava -Xms128m MyClass
java -Xms128m -Xmx128m MyClass
Read more here 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:
Speed tradeoff of Java's -Xms and -Xmx options
What are the Xms and Xmx parameters when starting JVMs?
在环境变量中设置 _JAVA_OPTIONS=-Xms128m ,我已附上屏幕截图以供参考。您可以相应地设置内存。
发生这种情况是因为 JVM 没有分配所需的内存。
set _JAVA_OPTIONS=-Xms128m in you environment variables, I have attached screenshot for reference. you can set the memeory accordingly.
This happens because JVM was not allocated the memory required.