Tuesday, July 14, 2009

Installing Eclipse Galileo on Ubuntu 9.04

Download Eclipse Classic SDK. Untar the package. Run eclipse.
wget http://d2u376ub0heus3.cloudfront.net/galileo/eclipse-SDK-3.5-linux-gtk.tar.gz
tar -zxvf eclipse-SDK-3.5-linux-gtk.tar.gz
cd eclipse
eclipse &

Some projects like Android are large enough that Eclipse's Java VM sometimes runs out of memory while compiling them. So we make a startup script for eclipse with command line parameters for increased Java heap size. Create a new file ~/bin/eclipse, and in that file, put:
#/usr/bin/bash
`~/bin/packages/eclipse3.5/eclipse -vmargs -Xms128M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=512M &> /dev/null` &

Lastly, make the file executable:
chmod u+x ~/bin/eclipse