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

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

    I have faced same problem from java heap size.

    I have two solutions if you are using java 5(1.5).

    1. just install jdk1.6 and go to the preferences of eclipse and set the jre path of jav1 1.6 as you have installed.

    2. Check your VM argument and let it be whatever it is. just add one line below of all the arguments present in VM arguments as -Xms512m -Xmx512m -XX:MaxPermSize=...m(192m).

    I think it will work...

提交回复
热议问题