java.lang.OutOfMemoryError: PermGen space

错误提示:

PermGen space

java.lang.OutOfMemoryError: PermGen space
at java.lang.String.intern(Native Method)
at com.eh.applicator.productcatalog.model.EHProductDO62CTest.testevaluate(EHProductDO62CTest.java:14)
at com.mm.MMTestCaseBase.run(MMTestCaseBase.java:91)

问题出现场景:

ant的buil.xml中,用来执行junit

<junit printsummary="yes" fork="yes" forkmode="once" errorProperty="junit.test.failed" failureProperty="junit.test.failed">
			<jvmarg value="-Xmx712m" />
</junit>

更改为:

<junit printsummary="yes" fork="yes" forkmode="once" errorProperty="junit.test.failed" failureProperty="junit.test.failed">
			<jvmarg value="-Xmx712m" />
			<jvmarg value="-XX:MaxPermSize=512m" />
这里设置了一个maxPermsize
</junit>

相关推荐