线程“主”中的异常java.lang.OutOfMemoryError:Java堆空间 [英] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
问题描述
我正在使用Eclipse来运行java程序类,而我运行的时候我遇到这个错误
I'm using Eclipse to run java program class, while I run it i got this error
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
然后我更改了从属性>运行> VM选项,并且我再次运行程序我有一个新的错误,
then i changed the VM from the Properties > Run > VM Options, and I run the program again i got a new error,
Error occurred during initialization of VM
Incompatible initial and maximum heap sizes specified
我正在尝试在我的程序中应用斯坦福图书馆,任何想法如何解决这个错误。
I'm trying to apply stanford libraries in my program, any idea how to solve this error .
推荐答案
更改Eclipse的VM可以从
更改MV的数量Windows>首选项> Java>已安装JRE
从那里选择JRE并单击编辑,然后写入默认VM参数:-Xmx1024M或任何其他内存量...
to change the VM for Eclipse you can change the amount of the MV from Windows> Preferences> Java> Installed JREs from there select the JRE and click edit, then write in the Default VM Arguments: to -Xmx1024M or any other amount of memory ...
这篇关于线程“主”中的异常java.lang.OutOfMemoryError:Java堆空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!