Ubuntu Geek

Ubuntu Linux Tutorials,Howtos,Tips & News | Gutsy,Hardy,Intrepid

  • RSS Feed

    subscribe to the ubuntu Geek RSS feed

  • Follow Us on Twitter

  • Sponsor


  • Categories

  • Meta

  • Sponsor

  • Archives

  • Support Ubuntugeek

    Amount $:
    Website(Optional):


  • Favourite Sites

How to Install and setup Eclipse with Sun’s Java

Posted by admin on November 29th, 2007 Email This Post Email This Post

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. A large and vibrant ecosystem of major technology vendors, innovative start-ups, universities, research institutions and individuals extend, complement and support the Eclipse platform.

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.

Share/Save/Bookmark

Related Articles

4 Responses to “How to Install and setup Eclipse with Sun’s Java”

  1. coward Says:

    Thanks seems to work like a charm with the heap size change.

  2. Wayne Philip Says:

    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..

  3. Miguel Leeuwe Says:

    I had the same problem, simply redoing the steps described solved my problem.

  4. Paragon Says:

    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.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>