Increase JVM max heap size for Eclipse

后端 未结 4 1557
无人共我
无人共我 2020-11-28 08:30

I am trying to increase the max heap size for my Eclipse. I have tried specifying in eclipse.ini or through the command line, but are not working.

My m

4条回答
  •  时光取名叫无心
    2020-11-28 08:44

    It is possible to increase heap size allocated by the Java Virtual Machine (JVM) by using command line options.

    -Xms        set initial Java heap size
    -Xmx        set maximum Java heap size
    -Xss        set java thread stack size
    

    If you are using the tomcat server, you can change the heap size by going to Eclipse/Run/Run Configuration and select Apache Tomcat/your_server_name/Arguments and under VM arguments section use the following:

    -XX:MaxPermSize=256m
    -Xms256m -Xmx512M
    

    If you are not using any server, you can type the following on the command line before you run your code:

    java -Xms64m -Xmx256m HelloWorld
    

    More information on increasing the heap size can be found here

提交回复
热议问题