MyEClipse运行项目是报错:
Exception in thread "Thread-5" java.lang.OutOfMemoryError: Java heap space
at java.io.BufferedInputStream.<init>(BufferedInputStream.java:178)
at java.io.BufferedInputStream.<init>(BufferedInputStream.java:158)
at com.chainunion.communication.MC8000Agent.receiveData(MC8000Agent.java:692)
at com.chainunion.communication.MC8000Agent.produce(MC8000Agent.java:517)
at com.chainunion.communication.MC8000Agent$Produce.run(MC8000Agent.java:411)
Exception in thread "Thread-6" java.lang.OutOfMemoryError: Java heap space
at com.sun.org.apache.xerces.internal.xni.XMLString.toString(XMLString.java:226)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:583)
解决的办法:内存溢出的问题,解决的方案是加大heap size
JVM设置:
选中你所建的工程,在菜单处找到run-->run configurations,然后选择X=Arguments,在VM框内设置-Xmx参数好后Apply再run就设置好了,至于-Xmx要设置多大就看情况具体情况了 设置为:-Xms512m -Xmx1024m -XX:MaxPermSize=256m