Tuesday, May 17, 2011

Eclipse working very slow with Ubuntu.

I had this problem that Eclipse use to run very slow on Ubuntu for some reason, I always wondered that it must be my RAM issue or something.

Blah! My ignorance would have been better if I would have googled it at the first go rather then making my own assumptions.

The problem evidently was with GIJ(GNU interpreter for Java) which ubuntu installs by default.
A workaround to this problem is by choosing SUN's java which can be done by using command:

sudo update-alternatives --config java

and selecting the Sun's java which was option 2 in my case. After doing this switch you need to restart eclipse. If things still does not work fine then you might have to edit the jvm config files using :

sudo -b gedit /etc/jvm

and move the line:

/usr/lib/jvm/java-1.5.0-sun

to the top and edit eclipse's java_home file using :

sudo -b gedit /etc/eclipse/java_home

and add:

/usr/lib/jvm/java-1.5.0-sun

to the top of the file. Now restart the eclipse. If the problem prevails, go and buy some more RAM or a better processor ;)