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

前端 未结 5 857
天涯浪人
天涯浪人 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:55

    Not Eclipse is running out of memory, but ant. Ant is run as an external tool from eclipse, so it does not inherit the VM settings you are using for eclipse. You can set the options for it in the external tool run configuration. Go to Run -> External Tools -> External Tool Configurations... Then under "Ant Builds" you have to look up your ant build, and you can set the vm arguments in the JRE tab.

提交回复
热议问题