线程“主”中的异常java.lang.OutOfMemoryError:Java堆空间

编程入门 行业动态 更新时间:2024-10-22 10:53:15
本文介绍了线程“主”中的异常java.lang.OutOfMemoryError:Java堆空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用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堆空间

本文发布于:2023-11-25 18:51:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630926.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:线程   异常   空间   Java   lang

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!