Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install Eclipse and Java SDK on Ubuntu?

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.

like image 563
petergood Avatar asked Nov 28 '22 04:11

petergood


2 Answers

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!

like image 197
tuxtimo Avatar answered Nov 29 '22 17:11

tuxtimo


Don't install Eclipse from the Linux repositories. These repositories may not be up-to-date with the last versions released by Eclipse. A better approach is to follow the instructions in this answer from Ask Ubuntu. For Java programming, make sure you have a JDK and a JRE installed

apt-get install openjdk-7-jdk openjdk-7-jre

You can download whatever Eclipse Java IDE version suits you best from the Eclipse website (link to the Eclipse v4.4 (Luna) release).

like image 30
Mmmh mmh Avatar answered Nov 29 '22 18:11

Mmmh mmh