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

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

    If everything else fails, in addition to increasing the max heap size try also increasing the swap size. For Linux, as of now, relevant instructions can be found in https://linuxize.com/post/create-a-linux-swap-file/.

    This can help if you're e.g. compiling something big in an embedded platform.

提交回复
热议问题