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

后端 未结 21 1686
死守一世寂寞
死守一世寂寞 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条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-21 05:21

    Regarding to netbeans, you could set max heap size to solve the problem.

    Go to 'Run', then --> 'Set Project Configuration' --> 'Customise' --> 'run' of its popped up window --> 'VM Option' --> fill in '-Xms2048m -Xmx2048m'.

提交回复
热议问题