Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 4996  / 3 Years ago, sun, june 20, 2021, 2:03:30

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


More From » apt

 Answers
1

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.


[#30156] Monday, June 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mentpengu

Total Points: 148
Total Questions: 114
Total Answers: 119

Location: Anguilla
Member since Sun, Aug 7, 2022
2 Years ago
mentpengu questions
Sun, Apr 17, 22, 18:09, 2 Years ago
Fri, Aug 12, 22, 01:35, 2 Years ago
Tue, Jul 26, 22, 14:52, 2 Years ago
;