How to deal with “java.lang.OutOfMemoryError: Java heap space” error?

后端 未结 21 2167
死守一世寂寞
死守一世寂寞 2020-11-21 04:49

I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into java.lang.OutOfMemoryEr

21条回答
  •  萌比男神i
    2020-11-21 05:14

    You could specify per project how much heap space your project wants

    Following is for Eclipse Helios/Juno/Kepler:

    Right mouse click on

     Run As - Run Configuration - Arguments - Vm Arguments, 
    

    then add this

    -Xmx2048m
    

提交回复
热议问题