Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 692
user1329572 Avatar asked Sep 25 '12 14:09

user1329572


People also ask

How to fix could not reserve enough space for object heap?

To fix the error "Could not reserve enough space for object heap", add the options "-Xmx<size>m" to set the maximum size for the object heap memory allocation. This must be set large enough to accommodate loading your application into memory, but smaller than your requested total memory allocation by 2GB.

Could not reserve enough space for object heap vm?

“Could not reserve enough space for object heap” is a specific JVM error that is raised when Java process cannot create the virtual machine due to memory constraints encountered on the running system: java -Xms4G -Xmx4G -jar HelloWorld.

Could not reserve enough space for object heap android studio?

Step 1 : Start Android studio and close any open project (File > Close Project). Step 2 : On Welcome window, Go to Configure > Settings. Step 4 : Change Build process heap size (Mbytes) to 1024 and Additional build process to VM Options to -Xmx512m. Step 5 : Close or Restart Android Studio.


1 Answers

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

Preferences dialog

like image 183
flup Avatar answered Sep 22 '22 14:09

flup