I already installed Java 8, but I don't know how to install Java 7 and how to switch between the two Java versions.
I also want to switch between Java 7 and 8 to update a project I am working on. I am a new Ubuntu user, so be very specific.
added: 12/31/2017
gero@4790k:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
When I try to use:
gero@4790k:~$ sudo apt-get install openjdk-7-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package openjdk-7-jdk is a virtual package provided by:
oracle-java9-installer 9.0.1-1~webupd8~0
oracle-java8-installer 8u151-1~webupd8~0
oracle-java7-installer 7u80+7u60arm-0~webupd8~1
You should explicitly select one to install.
E: Package 'openjdk-7-jdk' has no installation candidate
I don't even know how to select the the java installer 7u80.
Or if you can tell me how to install jdk-7u80-linux-x64.tar.gz or jdk-7u80-linux-x64.rpm .