Home » Development, eclipse

Workaround for Heap Space Problem in Eclipse

18 November 2007 130 views Comments Permanent Link

My earlier experience with Eclipse on Ubuntu can be found at

Getting Eclipse to Work on Ubuntu

Heap Space Problem:
I was wondering why configuring eclipse.ini file in /usr/lib/eclipse/eclipse.ini wasn’t reflecting.

My eclipse.ini file ha the following content:

————————————————————-
-vmargs
-Xms256m
-Xmx512m
————————————————————-

But this didn’t get reflected.
To check the heap status at all time do the following:
Goto Window -> Preference inside Eclipse.
In the general Section you will see a checkbox labeled Show heap status
Make sure this is checked. If this is checked you should be able to see bar in the bottom displaying the Heap Status. I saw that it always saw xxM of 62M SO my assignment of 256 M wasnt working.

Then I tried to set the Heap Space through terminal each time i run Eclipse then it worked.
Here is the command that I used.

eclipse -data /home/rungss/workspaces/eclipse-pdt -vmargs -Xms256M -Xmx512M

-data is the option to select the Workspace.
Now I have set new item in my Top Panel with the following details for each of my Workspaces.

To add a new Item to the Panel right click on the Panel click on Add to Panel from the popup menu.

You will see a popup window to select a Program to launch.
Select Custom Application Launcher which you should see at top left.

Now in the new popup window enter the following information
Type: Select Application from the drop down box (It will be selected by default)
Name: Enter the name for this Launch Configuration I have (Eclipse PDT)
Command: enter the command here in my case it is eclipse -data /home/rungss/workspaces/eclipse-pdt -vmargs -Xms256M -Xmx512M
Comments: Enter any Comment if you want to(It helps as You see both the Name and the Description on the tooltip for the Panel item.) I have set it to Eclipse PDT Workspace
Click on Close.

This works fine for me.

Now I dont see the Heap space Problem any more.

Related Posts with Thumbnails

Popularity: 2% [?]

PR: 0

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
  • Atrus
    While this is an older post, I would like to thank the author for writing this. I waas having problems with Eclipse, and Google brought up this post. Needless to say I have now solved my problem, and I give thanks to you!
  • rakee
    Hi,
    i have seen this site www.hyperwebenable.com where they are providing free websites to interested bloggers.

    I have converted my blog myblogname.blogspot.com to myname.com at no cost.

    Have your own brand site yourname.com instead of using free services like yourname.blogspot.com or yourname.wordpress.org.

    Have complete control of your website.

    You can also import your present blog content to new website with one click.

    Do more with your website with out limits @ www.hyperwebenable.com/freewebsite.php

    regards

    sirisha
blog comments powered by Disqus
Olark Livehelp