javac: java.lang.OutOfMemoryError when running ant from Eclipse

前端 未结 5 870
天涯浪人
天涯浪人 2021-02-13 19:16

I have given loads of memory to eclipse in the ini file but its still not using anything more than 300mb which i can see in the task manager.

  [javac] The syst         


        
5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-13 19:50

    You can properly set the -Xms512m -Xmx1024m options to the Ant bin/sh script that Eclipse will run once you launch a build.

    1. Go to your Eclipse folder
    2. Go to plugins > org.apache.ant_ > bin
    3. Modify the OS related Ant file

      • For Windows: Add this line to the ant.bat file export ANT_OPTS=-Xmx512m

      • For Unix/Mac OS X: You can directly edit the ant_exec_command command at the end of the ant file or setting the $ANT_ARGS variable

提交回复
热议问题