To install Java JDK 8
1. Add A Third Party PPA to Ubuntu
ubuntu@skubuntu:/Store/Software/Linux$ sudo add-apt-repository ppa:webupd8team/java
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
[sudo] password for ubuntu:
Press Enter
Output:
Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK8). There are no actual Java files in this PPA.
- http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [221 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [85.0 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [108 kB]
Get:9 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic/main amd64 Packages [1556 B]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [61.4 kB]
Get:11 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic/main Translation-en [928 B]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1440 B]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [460 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [172 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [705 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [171 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [6372 B]
Fetched 2256 kB in 8s (271 kB/s)
Reading package lists... Done
ubuntu@skubuntu:/Store/Software/Linux$
ubuntu@skubuntu:/Store/Software/Linux$ sudo apt update
Press Enter
Left Arrow Key then Press Enter #####Important########
To set Oracle JDK8 as default, install the "oracle-java8-set-default" package.
E.g.: sudo apt install oracle-java8-set-default
On Ubuntu systems, oracle-java8-set-default is most probably installed
automatically with this package.
###################### /usr/bin/java
- http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [221 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [85.0 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [108 kB]
Get:9 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic/main amd64 Packages [1556 B]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [61.4 kB]
Get:11 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic/main Translation-en [928 B]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1440 B]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [460 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [172 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [705 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [171 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [6372 B]
Fetched 2256 kB in 8s (271 kB/s)
Reading package lists... Done
ubuntu@skubuntu:/Store/Software/Linux$
ubuntu@skubuntu:/Store/Software/Linux$ sudo apt update
Press Enter
Left Arrow Key then Press Enter #####Important########
To set Oracle JDK8 as default, install the "oracle-java8-set-default" package.
E.g.: sudo apt install oracle-java8-set-default
On Ubuntu systems, oracle-java8-set-default is most probably installed
automatically with this package.
###################### /usr/bin/java
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
x
x
Important -> Why Oracle Java 7 And 6 Installers No Longer Work: http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html
Update: Oracle Java 9 has reached end of life: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
The PPA supports Ubuntu 18.10, 18.04, 16.04, 14.04 and 12.04.
More info (and Ubuntu installation instructions):
Debian installation instructions:
For Oracle Java 11, see a different PPA -> https://www.linuxuprising.com/2018/10/how-to-install-oracle-java-11-in-ubuntu.html
Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease [15.4 kB]
2. Update and install Oracle Java 8 on Your machine
ubuntu@skubuntu:/Store/Software/Linux$ sudo apt install oracle-java8-installer
ubuntu@skubuntu:/Store/Software/Linux$ which java
ubuntu@skubuntu:/Store/Software/Linux$ java -version
ubuntu@skubuntu:/Store/Software/Linux$
No comments:
Post a Comment