Eclipse的Java堆空间 [英] Eclipse Java heap space

查看:224
本文介绍了Eclipse的Java堆空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想qoppa PDF阅读器集成到我的Andr​​oid应用程序

I am trying to integrate qoppa pdf reader to my android application

我不喜欢它被描述如下:
http://www.qoppa.com/android/pdfsdk/guide/index.html
- 添加jar文件到我的项目的类路径中。
- 增加资产的文件夹。
- 添加libs文件夹

I did like it was described here: http://www.qoppa.com/android/pdfsdk/guide/index.html - add jar file into classpath of my project. - add assets folder. - add libs folder.

当我启动Eclipse,一切工作正常,我可以在我的工作空间打开项目和继续实施。但在运行PDF项目作为一个新的Eclipse实例时,我得到这个错误

When I start Eclipse, everything works fine, I can open the projects in my workspace and continue implementing. But when running the pdf project as a new Eclipse instance, i get this error

    [2012-10-29 22:23:25 - com.test] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(c.b.b.c.b.b.b.b.b.i$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
[2012-10-29 22:26:21 - Dex Loader] Unable to execute dex: Java heap space
[2012-10-29 22:26:23 - com.test] Conversion to Dalvik format failed: Unable to execute dex: Java heap space

我trye​​d干净我的项目,但仍然得到错误。

I tryed clean my project, but still getting the error.

我搜索中网,所以我发现我在eclipse.ini文件并在运行配置增加PermGen的大小。
下面是我的一些evlipse.ini更改后:

I searched in the net, so i found that I have to increased the PermGen size in the eclipse.ini file and in the Run Configuration. Here are my evlipse.ini after some changes:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx1024m

没有用,我仍然得到错误。

No use, I still get the error.

这可能是什么问题?

我想这是因为qoppapdf.jar的,瓶子的大小是巨大的,超过400万字节。
但它应该工作,因为有使用这个罐子样,我不知道为什么我的日食不能做到这一点。

i Think it is because of qoppapdf.jar, the size of the jar is huge, more than 4000000 bytes. But it is supposed to work because there are samples using this jar, i don't know why my eclipse can't do it

推荐答案

您需要增加分配的内存为您的运行配置,不偏食。
添加-Xms256m和-Xms1024m下VM参数字段。

You need to increase the allocated memory for your running configuration, not for eclipse. Add the -Xms256m and -Xms1024m under VM arguments field.

这篇关于Eclipse的Java堆空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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