Eclipse Gradle STS Extension: Could not reserve enough space for object heap

user1329572 picture user1329572 · Sep 25, 2012 · Viewed 12.2k times · Source

Once in a while I'll get the following error when the Gradle STS extension tries to execute my project's gradle build script after launching Eclipse 3.7 (Indigo) with the Gradle STS extension installed,

Unable to start the daemon process. The exit value was: 1.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/current/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Could not fetch model of type 'EclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.0-bin.zip'.

And here are my system specs:

  • Windows 7 32-bit
  • Eclipse 3.7 32-bit
  • Java jdk1.7.0_07 32-bit

Is this a known bug with this plugin? Any idea on how to fix it?

Answer

flup picture flup · Nov 4, 2013

In eclipse, go to Window, Preferences, Gradle, Arguments and add the gradle jvmargs -Xms128m -Xmx512m in the dialog:

Preferences dialog