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

后端 未结 21 1687
死守一世寂寞
死守一世寂寞 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:22

    Note that if you need this in a deployment situation, consider using Java WebStart (with an "ondisk" version, not the network one - possible in Java 6u10 and later) as it allows you to specify the various arguments to the JVM in a cross platform way.

    Otherwise you will need an operating system specific launcher which sets the arguments you need.

提交回复
热议问题