How to Install and setup Eclipse with Sun’s Java
Posted by admin on November 29th, 2007
Email This Post
Installing Eclipse,Sun Java in Ubuntu
sudo apt-get install eclipse sun-java6-jdk
This will install the required packages, however, Eclipse will run very slowly since it will be using GNU’s java, not Sun’s. We now need to make Sun’s java the default.
sudo update-java-alternatives -s java-6-sun
Next, edit the JVM configuration file
sudo -b gedit /etc/jvm
and add the following to the top of the file
/usr/lib/jvm/java-6-sun
There is a bug right now were Eclipse ignores Ubuntu’s java-common settings and uses its own (bug 45347). To work around the bug, you need to edit Eclipse’s java_home file
sudo -b gedit /etc/eclipse/java_home
and add
/usr/lib/jvm/java-6-sun
to the top of the file.
Lastly, if you have lots of memory you may want to increase the heap size (warning: If you make the heap size too large then parts of eclipse will continuously swap in and out.).The settings can be altered by editing the eclipse.ini file.
For feisty users:
sudo -b gedit /usr/lib/eclipse/eclipse.ini
The argument Xms refers to the minimum heap size and Xmx refers to the maximum heap size.
If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

December 7th, 2007 at 8:27 am
Thanks seems to work like a charm with the heap size change.
July 17th, 2008 at 1:16 pm
Hi,
Am a newby to this .. struggling with <>
It goes through the whole effort and then pops up a window (in terminal that looks like the old DOS editors (blur backround - no options) and when I close it all, the terminal window is closed and the app is not installed .. also cannot execute anything else..
I only have /etc/jvm.d not the /usr/lib/eclipse/ ???
Help would be appreciated..
Furthermore I think your assistance is great., Have used it for other things..