在 Eclipse IDE 中运行我的 Java 代码时,出现错误:
Exception in thread "D3D Screen Updater" Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
我搜索了这个错误并尝试了描述的解决方案 here和 here , 但他们没有工作。
我在 eclipse.ini 中更改了这些参数:
--launcher.XXMaxPermSize
512M
-Xms40m
-Xmx512m
到:
--launcher.XXMaxPermSize
1024M
-Xms512m
-Xmx2048m
编辑:
我在运行配置中更改了这个参数:
但我仍然得到同样的错误。我错过了什么吗?
最佳答案
The memory settings in eclipse.ini is allocated to Eclipse IDE only, not the program you want to run. A very common mistake is updated the heap size in eclipse.ini, and expects it to solve above out of memory problem.
http://www.mkyong.com/eclipse/eclipse-java-lang-outofmemoryerror-java-heap-space/
关于java - 无法解决eclipse中的 "Java heap space"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27132169/