Eclipse的.ini设置似乎并没有帮助我更改最大堆大小 [英] Eclipse's .ini settings don't seem to be helping me change the max heap size

查看:128
本文介绍了Eclipse的.ini设置似乎并没有帮助我更改最大堆大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的eclipse.ini文件:

Here is my eclipse.ini file:

-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.java.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx256m

默认内容.但是,我有一个看起来好像崩溃的应用程序,堆大小为64 mb.我每隔几秒钟打印一次堆大小(以字节为单位),直到崩溃为止,这是最后的输出:

Default stuff. However, I have an app that appears to be crashing with 64 mb of heap size. I'm printing out the heap size (in bytes) every few seconds until it crashes, and here's the last output:

66650112 线程主"中的异常java.lang.OutOfMemoryError:Java堆空间 在java.lang等

66650112 Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.lang etc

我正在使用Sun的Java.我是否需要设置Java可用的最大内存?

I'm using Sun's java. Is there another place I need to set the maximum ram available to java?

推荐答案

您似乎说您的应用因内存不足错误而崩溃,在这种情况下,您应该提供

You seem to say your app crashes with an out of memory error, in this case you should provide JVM args to the app settings the heap size, not to eclipse

它们看起来像这样:

-Xms256M;-Xmx512M

这篇关于Eclipse的.ini设置似乎并没有帮助我更改最大堆大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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