fids@fids-NDiSM323:~$ java-version
java-version: command not found
fids@fids-NDiSM323:~$ java -versin
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* gcj-4.7-jre-headless
* openjdk-7-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
fids@fids-NDiSM323:~$ sudo apt-get install default-jre
[sudo] password for fids:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package default-jre is a virtual package provided by:
oracle-java9-installer 9b111+9b111arm-1~webupd8~1
oracle-java8-installer 8u77+8u77arm-1~webupd8~4
oracle-java6-installer 6u45-0~webupd8~8
oracle-java7-installer 7u80+7u60arm-0~webupd8~1
You should explicitly select one to install.
E: Package 'default-jre' has no installation candidate
Asked
Active
Viewed 1,733 times
-1

Mitch
- 107,631
-
Try `sudo apt-get install oracle-java-8-installer'. I think this was caused by the Webupd8 custom repository. Simply choose a version. I'd recommend the Java 8. – diamondburned Apr 05 '16 at 10:55
1 Answers
1
You have typos here:
fids@fids-NDiSM323:~$ java -versin
It must be java -version
Then run this:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
To install Oracle JDK 8:
sudo apt-get install oracle-java8-installer
Or execute the following command:
sudo apt-get install default-jre
This will install the Java Runtime Environment (JRE). If you instead need the Java Development Kit (JDK), which is usually needed to compile Java applications (for example Apache Ant, Apache Maven, Eclipse and IntelliJ IDEA execute the following command:
sudo apt-get install default-jdk
That is everything that is needed to install Java.
Then run java -version

bhordupur
- 640