0

I want to install java so that I can use the android sdk

Using the software centre I installed 'ubuntu restricted extras' (as it says that it includes java). The software centre looks like this has been successful.

In the terminal if I type: java -version It comes back with....

The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install <selected package>

Q1) Does this mean Java is not installed?

Q2) Is there a better way to report which type and version of java is installed

Q3) If it is not installed then what could have gone wrong with the installations of 'extras'

Q4) Is there a simple way of installing the latest java runtime? I.e. without having to know what the latest verion of java is and without downloading and unzipping and running scripts but just using the standard add-apt-repository + apt-get install.

Thanks

3 Answers3

0

This means that you have several openjdk's installed but not Oracle Java. You can choose between those with sudo update-alternatives --config javac.

But to install oracle java, you should follow this guide.

If you want you can uninstall openjdk before installing oracle java with sudo apt-get remove openjdk-6-jre default-jre default-jre-headless or/and follow this to uninstall openjdk7.

If you want you can keep them as well, but it is up to what you want. Openjdk is fine as well.

Hope it was clear enough. Be well.

Paul
  • 77
  • 1
  • 1
  • 9
0

You can use OpenJdk as has been pointed out but if you want Oracle Java you can follow this guide.

Hope it helps!

mojo706
  • 601
0

Execute sudo apt-get install default-jre