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
See this topic with best Eclipse JVM settings
your eclipse.ini settings will take effect only if u change following:
Run -> External Tools -> External Tool
Configurations. go to configuration that u use, under jre tab -select option
Run in same JRE in workspace
this worked 4 me
You can properly set the -Xms512m
-Xmx1024m
options to the Ant bin/sh script that Eclipse will run once you launch a build.
plugins > org.apache.ant_<version> > bin
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
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.
I had the same problem a week ago, and the solution was set fork attribute to true, to run javac in a separate process with its own heap size settings. If fork is set to false, or not set (default is false), javac will run in the same process as Ant. The following is a snippet from my current build.xml:
<javac fork="true"
srcdir="${basedir}/src"
.....
</javac>
Setting fork to true will also limit any memory leaks in javac implementation to its own child process, without affecting the parent Ant process. I read about this hint here