I noticed gij-4.1 was eating all my CPU when I was running Eclipse, so I decided to switch to Sun’s JRE.
Adding Sun’s JRE was no problem… there are plenty of tutorials on how to do that at ubuntuforums.org, but the bigger issue was getting Eclipse to recognize my preferred virtual machine. Even though update-alternatives showed /usr/lib/j2re1.5-sun/bin/java as preferred, and even after I set it’s priority higher so I had
*+ 1 /usr/lib/j2re1.5-sun/bin/java
Eclipse still wouldn’t recognize it!
I finally gave up and added a command line argument to Eclipse’s startup:
/usr/bin/eclipse -vm /usr/lib/j2re1.5-sun/bin/java -vmargs -Xmx128M
Notice I had to increase the memory size because the default is 64Mb, which is NOT enough.
Now my load average is back to about 0.2 and 90% idle instead of gij-4.1 taking 90%.