+ Start a Discussion

Unable to create project


       I am trying to create a Force.com project in Eclipse Helios but I am getting an error as Unable to create project. Reason: OutOfMemoryError: Java heap space. 


My eclipse.ini settings are:









Problem :-

You are probably allocating a lot of objects in a long (possibly infinite) loop, or you have a memory leak somewhere (e.g. storing object references in a list and forgetting to null them out when you're done with them).

The error is thrown when the garbage collector is unable to free up enough space to allow allocation to the requested object. So basically when a new object is to be created and there is not enough space in the heap, the jvm will invoke the garbage collector. If after the gc completion, there is still not enough space freed up, then the jvm throws an OutOfMemoryError: java heap. Heap space is occupied by instance variables only.

Also , The org that you are working on may have several, large managed packages installed. If you want to increase your heap space, you can use java -Xms<initial heap size> -Xmx<maximum heap size> on the command line. By default, the values are 32m and 128m.

Solution :-

All you need to do is to add the parameter “-Xmx1024m” to the “$ANT_OPTS” environment variable in your Ant shell script or batch file. (This parameter raises the maximum memory limit for your Java virtual machine to 1GB, instead of 128MB or whatever paltry amount the default is.) Try to give eclipse some more JVM memory.

 To expand Eclipse's memory allowance:

- Open the eclipse.ini file in the main Eclipse folder
- Increase the -Xmx property to 1200m (this is 1.2 Gigs of RAM).
- Note:  additional memory allowance up to 2 GB and beyond may require the 64-bit edition of Eclipse and JVM.

This may give you an TimeOut Message but You can click continue.Check This Blog for more details .

Important :

Click on the Star Icon aside if this post provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You


This solution worked for me.


It just takes a some time to load if the project is large, so be patient people.