If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
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.




Thanks seems to work like a charm with the heap size change.
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..
I had the same problem, simply redoing the steps described solved my problem.
I am a newbie myself. I am not sure if I am getting your question right but I hope this helps. Press tab and the ‘OK’ on the DOS like screen will be highlighted. Now press enter.
dear mr. geek,
thanks for your article. i linked to it when blogging about using Subclipse together with Eclipse Ganymede.
best regards
Stotti
Thanks, great article!
Thanks worked great, also with 9.04
In my case I needed sun sdk 1.5 (I need that for a course I’am following) changes I had to make :
sudo update-java-alternatives -s java-1.5.0-sun
and ofcourse the directory is in that case :
/usr/lib/jvm/java-1.5.0-sun
kind regards,
Jeroen
Nice tutorial but that installs eclipse 3.2 which is almost 3 years old. This June eclipse 3.5 will be out. With eclipse your best bet is to just download and install from the elipse.org site.
Erik
Is there a way not to download gcj?