Install Java 8 on Ubuntu

image_print

apt-add-repository ppa:webupd8team/java

Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.

More info (and Ubuntu installation instructions):
- for Oracle Java 7: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
- for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
Debian installation instructions:
- Oracle Java 7: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

Oracle Java 9 (for both Ubuntu and Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html

For JDK9, the PPA uses standard builds from: https://jdk9.java.net/download/ (and not the Jigsaw builds!).

Important!!! For now, you should continue to use Java 8 because Oracle Java 9 is available as an early access release (it should be released in 2016)! You should only use Oracle Java 9 if you explicitly need it, because it may contain bugs and it might not include the latest security patches! Also, some Java options were removed in JDK9, so you may encounter issues with various Java apps. More information and installation instructions (Ubuntu / Linux Mint / Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html
 Mehr Informationen: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Drücken Sie [ENTER], um fortzufahren oder Strg-c, um das Hinzufügen abzubrechen
gpg: Schlüsselbund `/tmp/tmpzqgp1pjb/secring.gpg' erstellt
gpg: Schlüsselbund `/tmp/tmpzqgp1pjb/pubring.gpg' erstellt
gpg: Schlüssel EEA14886 von hkp-Server keyserver.ubuntu.com anfordern
gpg: /tmp/tmpzqgp1pjb/trustdb.gpg: trust-db erzeugt
gpg: Schlüssel EEA14886: Öffentlicher Schlüssel "Launchpad VLC" importiert
gpg: Keine uneingeschränkt vertrauenswürdigen Schlüssel gefunden
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1
gpg: importiert: 1 (RSA: 1)
OK
apt-get update
apt-get install oracle-java8-installer
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut. 
Statusinformationen werden eingelesen.... Fertig
Die folgenden zusätzlichen Pakete werden Installiert
 gsfonts-x11 java-common libfontenc1 libxfont1 oracle-java8-set-default x11-common xfonts-encodings xfonts-utils
Vorgeschlagene Pakete:
 binfmt-support visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho
 | ttf-sazanami-mincho ttf-arphic-uming firefox | firefox-2 | iceweasel | mozilla-firefox | iceape-browser | mozilla-browser
 | epiphany-gecko | epiphany-webkit | epiphany-browser | galeon | midbrowser | moblin-web-browser | xulrunner | xulrunner-1.9
 | konqueror | chromium-browser | midori | google-chrome
Die folgenden NEUEN Pakete werden installiert:
 gsfonts-x11 java-common libfontenc1 libxfont1 oracle-java8-installer oracle-java8-set-default x11-common xfonts-encodings
 xfonts-utils
0 aktualisiert, 9 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 824 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 1.951 kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] J

Congratulations! Now you have sucessfully installed Java on your box.

Test it

java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)