eclipse编译代码时老报
内存溢出,感觉配的够大还是不行
在eclipse的 log中找到了异常原因
java.lang.OutOfMemoryError: Java heap space
at java.lang.Throwable.getStackTraceElement(Native Method)
at java.lang.Throwable.getOurStackTrace(Throwable.java:591)
at java.lang.Throwable.printStackTrace(Throwable.java:510)
at org.eclipse.jdt.internal.compiler.util.Util.getExceptionSummary(Util.java:452)
at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:583)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:518)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:328)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:362)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:545)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:524)
at org.eclipse.core.internal.resources.Project.build(Project.java:115)
at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:222)
at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:162)
at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:483)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
这是我的eclipse.ini配置
C:\Program Files\Java\jre6\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
--launcher.defaultAction
openFile
-Vmargs
-Xms1548m
-Xmx1548m
-XX:PermSize=912m
-XX:MaxPermSize=912m
求大神帮忙解决一下
------解决方案--------------------这内存开的这么大了。。。应该装了什么插件挂了所致吧,也许要考虑重弄个Eclipse。
话说很奇怪,你这是64位的JVM么?内存都已经超2G了。。。
------解决方案--------------------配置这么大应该可以的,建议你到对应的tomcat服务器配置,在Optional program arguments 选项:如 -Xms128m -Xmx640m -XX:MaxPermSize=256M
------解决方案--------------------换个eclipse版本最简单。
------解决方案--------------------可能申请超2G,windows下jvm得到了约2G左右内存,但又因为使用消耗导致内存溢出。