获取“Java堆空间”时的Eclipse内存设置和“内存不足” [英] Eclipse memory settings when getting "Java Heap Space" and "Out of Memory"

查看:175
本文介绍了获取“Java堆空间”时的Eclipse内存设置和“内存不足”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试在eclipse中启动并运行flex / java项目时,我使用Eclipse,Tomcat和JRE,不断获得Out of Memory Exception和Java Heap Space。



在研究尝试调整内存设置时,我找到三个调整位置的地方:




  • Eclipse.ini


  • 窗口>首选项下的JRE设置


  • Catalina.sh或Catalina.bat




在这些不同的地方设置-xms和-xmx有什么区别,是什么意思? >

有没有办法验证这些内存设置是否相应设置?



什么是最优的-xms和-xmx



任何其他内存提示?



谢谢。

解决方案

-xms是启动内存(在VM启动时),-xmx是VM的最大内存




  • eclipse.ini:运行eclipse的VM的内存

  • jre设置:从eclipse运行的java程序的内存

  • catalina.sh:tomcat服务器的内存


When trying to launch and run a flex/java project in eclipse I kept getting a "Out of Memory Exception" and "Java Heap Space" using Eclipse, Tomcat and a JRE.

While researching trying to adjust the memory settings I found three places to adjust these:

  • Eclipse.ini

  • The JRE Settings under Window > Preferences

  • Catalina.sh or Catalina.bat

What are the differences between setting -xms and -xmx in these different places and what does is mean?

Is there any way to verify these memory settings are being set accordingly?

What are the optimal -xms and -xmx settings for a computer with 2gb of RAM?

Any other memory tips?

Thanks.

解决方案

-xms is the start memory (at the VM start), -xmx is the maximum memory for the VM

  • eclipse.ini : the memory for the VM running eclipse
  • jre setting : the memory for java programs run from eclipse
  • catalina.sh : the memory for your tomcat server

这篇关于获取“Java堆空间”时的Eclipse内存设置和“内存不足”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆