Skip to main content

Posts

Showing posts from November, 2009

OutOfMomory on running Ant build in Eclipse

Running Ant build via Eclipse may throw following error: Error: Java heap space java.lang.OutOfMemoryError: Java heap space To overcome this error, we need to increase the maximum heap size for JVM. Complete steps are: Select Run > External Tools > External Tools Configuration... Select New launch configuration button. Give any suitable name. On "Main" tab, specify build file. For e.g., C:\project1\build.xml On "Targets" tab, specify targets and their orders to run. JRE tab, select "Separate JRE:" and specify the JRE installed. In my case it is jdk1.6.0_17. In "VM arguments", add -Xmx500M for 500 MB of heap space. Press Apply button. Press Run or Close button.