How can I install Eclipse and Java SDK on Ubuntu?

petergood picture petergood · Aug 9, 2012 · Viewed 67.4k times · Source

I have just downloaded Ubuntu. It runs much faster than my Windows XP. But, I don't know how I can set up Eclipse v4.2 (Juno), or the Java SDK. I am currently developing in the Lightweight Java Game Library, so I might need some help with that too.

Answer

tuxtimo picture tuxtimo · Aug 9, 2012

Execute this in your terminal:

sudo apt-get install eclipse
sudo apt-get install openjdk-6-jdk openjdk-6-source openjdk-6-demo openjdk-6-doc openjdk-6-jre-headless openjdk-6-jre-lib 

The first one installs Eclipse (you will be asked to enter your password), and the second one installs all the Java stuff you may need!