Eclipse Java 堆大小设置为-Xms512m -Xmx512m。但由于“内存不足错误 Java 堆空间”,我的一个程序执行失败。
我试图增加java堆大小
eclipse.exe -vmargs -Xms512m -Xmx1024m
Result:JVM Error
eclipse.exe -vmargs -Xms1024m -Xmx1024m
Result:Again JVM error
另外,我在 eclipse.ini 中修改了 -Xms 和 -Xmx 但我没有成功。这里也有同样的错误。
我的机器有 3 GB RAM 和 Windows XP。而且我只有一个 Eclipse 安装。Java版本是1.7。
这是eclipse上错误的堆栈跟踪
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at java.io.StringWriter.write(Unknown Source)
at com.sun.org.apache.xml.internal.serializer.ToStream.processDirty(Unknown Source)
at com.sun.org.apache.xml.internal.serializer.ToStream.characters(Unknown Source)
at com.sun.org.apache.xml.internal.serializer.ToUnknownStream.characters(Unknown Source)
at com.sun.org.apache.xml.internal.serializer.ToUnknownStream.characters(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
at businessrule.implementation.WriteToXML.printtoXML(WriteToXML.java:53)
at businessrule.implementation.WriteToXML.UpdateKnowledgeBase(WriteToXML.java:41)
at businessrule.implementation.ExecuteRule2.<init>(ExecuteRule2.java:133)
at businessrule.implementation.BusinessRules.main(BusinessRules.java:81)