The default java SDK of Ubuntu is opnejdk. So you can't install Oracle(SUN) java SDK using default repository. Please follow those steps to install Oracle Java SDK.
Step 1 : Add and update repository.
$ sudo add-apt-repository ppa:webupd8team/java
You are about to add the following PPA to your system:
Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK6 / JDK7 / JDK8). There are no actual Java files in this PPA.
More info:
- 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: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or ctrl-c to cancel adding it
[Enter] Key here
gpg: keyring `/tmp/tmpI0u0oA/secring.gpg' created
gpg: keyring `/tmp/tmpI0u0oA/pubring.gpg' created
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpI0u0oA/trustdb.gpg: trustdb created
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
$ sudo apt-get update
.....
Fetched 18.3 kB in 5s (3,137 B/s)
Reading package lists... Done
Step 2 : Install Java8
Enter following command to install java8
In the middle of this installation, you can see the two messages about license.
Please select OK and Yes to install it.
$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
kde-l10n-ko language-pack-kde-en language-pack-kde-ko language-pack-kde-en-base kde-l10n-engb
language-pack-kde-ko-base
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
java-common
Suggested packages:
default-jre equivs 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
The following NEW packages will be installed:
java-common oracle-java8-installer
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 84.1 kB of archives.
After this operation, 469 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://kr.archive.ubuntu.com/ubuntu/ precise/main java-common all 0.43ubuntu2 [61.7 kB]
Get:2 http://ppa.launchpad.net/webupd8team/java/ubuntu/ precise/main oracle-java8-installer all 8u25+8u6arm-1~webupd8~1 [22.4 kB]
Fetched 84.1 kB in 1s (60.8 kB/s)
Preconfiguring packages ...
Selecting previously unselected package java-common.
(Reading database ... 199785 files and directories currently installed.)
Unpacking java-common (from .../java-common_0.43ubuntu2_all.deb) ...
Selecting previously unselected package oracle-java8-installer.
Unpacking oracle-java8-installer (from .../oracle-java8-installer_8u25+8u6arm-1~webupd8~1_all.deb) ...
Processing triggers for doc-base ...
Processing 2 added doc-base files...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Setting up java-common (0.43ubuntu2) ...
Setting up oracle-java8-installer (8u25+8u6arm-1~webupd8~1) ...
Downloading Oracle Java 8...
--2014-12-30 01:24:55-- http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-i586.tar.gz
Resolving download.oracle.com (download.oracle.com)... 1.255.2.67, 1.255.2.35
Connecting to download.oracle.com (download.oracle.com)|1.255.2.67|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-i586.tar.gz [following]
--2014-12-30 01:24:56-- https://edelivery.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-i586.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.49.150.140
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.49.150.140|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-i586.tar.gz?AuthParam=1419870417_24e80b7401e9deec3d03a5126c9cd068 [following]
--2014-12-30 01:24:58-- http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-i586.tar.gz?AuthParam=1419870417_24e80b7401e9deec3d03a5126c9cd068
Connecting to download.oracle.com (download.oracle.com)|1.255.2.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 162406866 (155M) [application/x-gzip]
Saving to: `jdk-8u25-linux-i586.tar.gz'
0K ........ ........ ........ ........ ........ ........ 1% 3.71M 41s
3072K ........ ........ ........ ........ ........ ........ 3% 3.98M 39s
6144K ........ ........ ........ ........ ........ ........ 5% 4.43M 36s
9216K ........ ........ ........ ........ ........ ........ 7% 4.09M 35s
12288K ........ ........ ........ ........ ........ ........ 9% 3.96M 35s
15360K ........ ........ ........ ........ ........ ........ 11% 2.98M 36s
18432K ........ ........ ........ ........ ........ ........ 13% 3.78M 35s
21504K ........ ........ ........ ........ ........ ........ 15% 4.09M 34s
24576K ........ ........ ........ ........ ........ ........ 17% 4.19M 33s
27648K ........ ........ ........ ........ ........ ........ 19% 4.03M 32s
30720K ........ ........ ........ ........ ........ ........ 21% 3.72M 32s
33792K ........ ........ ........ ........ ........ ........ 23% 4.18M 31s
36864K ........ ........ ........ ........ ........ ........ 25% 3.66M 30s
39936K ........ ........ ........ ........ ........ ........ 27% 4.00M 29s
43008K ........ ........ ........ ........ ........ ........ 29% 3.98M 28s
46080K ........ ........ ........ ........ ........ ........ 30% 4.14M 27s
49152K ........ ........ ........ ........ ........ ........ 32% 4.02M 27s
52224K ........ ........ ........ ........ ........ ........ 34% 3.99M 26s
55296K ........ ........ ........ ........ ........ ........ 36% 4.04M 25s
58368K ........ ........ ........ ........ ........ ........ 38% 4.00M 24s
61440K ........ ........ ........ ........ ........ ........ 40% 4.24M 23s
64512K ........ ........ ........ ........ ........ ........ 42% 3.58M 23s
67584K ........ ........ ........ ........ ........ ........ 44% 3.38M 22s
70656K ........ ........ ........ ........ ........ ........ 46% 3.86M 21s
73728K ........ ........ ........ ........ ........ ........ 48% 3.52M 21s
76800K ........ ........ ........ ........ ........ ........ 50% 2.74M 20s
79872K ........ ........ ........ ........ ........ ........ 52% 3.02M 20s
82944K ........ ........ ........ ........ ........ ........ 54% 3.13M 19s
86016K ........ ........ ........ ........ ........ ........ 56% 2.97M 18s
89088K ........ ........ ........ ........ ........ ........ 58% 3.36M 18s
92160K ........ ........ ........ ........ ........ ........ 60% 3.63M 17s
95232K ........ ........ ........ ........ ........ ........ 61% 3.86M 16s
98304K ........ ........ ........ ........ ........ ........ 63% 3.88M 15s
101376K ........ ........ ........ ........ ........ ........ 65% 3.96M 14s
104448K ........ ........ ........ ........ ........ ........ 67% 3.85M 13s
107520K ........ ........ ........ ........ ........ ........ 69% 3.70M 13s
110592K ........ ........ ........ ........ ........ ........ 71% 3.44M 12s
113664K ........ ........ ........ ........ ........ ........ 73% 3.07M 11s
116736K ........ ........ ........ ........ ........ ........ 75% 1.77M 11s
119808K ........ ........ ........ ........ ........ ........ 77% 3.45M 10s
122880K ........ ........ ........ ........ ........ ........ 79% 3.52M 9s
125952K ........ ........ ........ ........ ........ ........ 81% 3.44M 8s
129024K ........ ........ ........ ........ ........ ........ 83% 3.36M 7s
132096K ........ ........ ........ ........ ........ ........ 85% 3.12M 6s
135168K ........ ........ ........ ........ ........ ........ 87% 3.41M 6s
138240K ........ ........ ........ ........ ........ ........ 89% 3.38M 5s
141312K ........ ........ ........ ........ ........ ........ 91% 3.49M 4s
144384K ........ ........ ........ ........ ........ ........ 92% 3.43M 3s
147456K ........ ........ ........ ........ ........ ........ 94% 3.41M 2s
150528K ........ ........ ........ ........ ........ ........ 96% 3.24M 1s
153600K ........ ........ ........ ........ ........ ........ 98% 3.38M 1s
156672K ........ ........ ........ ...... 100% 3.57M=44s
2014-12-30 01:25:42 (3.54 MB/s) - `jdk-8u25-linux-i586.tar.gz' saved [162406866/162406866]
Download done.
Removing outdated cached downloads...
update-alternatives: error: no alternatives for java.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/ControlPanel to provide /usr/bin/ControlPanel (ControlPanel) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/java to provide /usr/bin/java (java) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/jcontrol to provide /usr/bin/jcontrol (jcontrol) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/jjs to provide /usr/bin/jjs (jjs) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/appletviewer to provide /usr/bin/appletviewer (appletviewer) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/extcheck to provide /usr/bin/extcheck (extcheck) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/idlj to provide /usr/bin/idlj (idlj) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jar to provide /usr/bin/jar (jar) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jarsigner to provide /usr/bin/jarsigner (jarsigner) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/javac to provide /usr/bin/javac (javac) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/javadoc to provide /usr/bin/javadoc (javadoc) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/javafxpackager to provide /usr/bin/javafxpackager (javafxpackager) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/javah to provide /usr/bin/javah (javah) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/javap to provide /usr/bin/javap (javap) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/javapackager to provide /usr/bin/javapackager (javapackager) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jcmd to provide /usr/bin/jcmd (jcmd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jconsole to provide /usr/bin/jconsole (jconsole) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jdb to provide /usr/bin/jdb (jdb) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jdeps to provide /usr/bin/jdeps (jdeps) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jhat to provide /usr/bin/jhat (jhat) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jinfo to provide /usr/bin/jinfo (jinfo) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jmap to provide /usr/bin/jmap (jmap) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jmc to provide /usr/bin/jmc (jmc) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jps to provide /usr/bin/jps (jps) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jrunscript to provide /usr/bin/jrunscript (jrunscript) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jsadebugd to provide /usr/bin/jsadebugd (jsadebugd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jstack to provide /usr/bin/jstack (jstack) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jstat to provide /usr/bin/jstat (jstat) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jstatd to provide /usr/bin/jstatd (jstatd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/jvisualvm to provide /usr/bin/jvisualvm (jvisualvm) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/native2ascii to provide /usr/bin/native2ascii (native2ascii) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/rmic to provide /usr/bin/rmic (rmic) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/schemagen to provide /usr/bin/schemagen (schemagen) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/serialver to provide /usr/bin/serialver (serialver) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/wsgen to provide /usr/bin/wsgen (wsgen) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/wsimport to provide /usr/bin/wsimport (wsimport) in auto mode.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/xjc to provide /usr/bin/xjc (xjc) in auto mode.
Oracle JDK 8 installed
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/lib/i386/libnpjp2.so to provide /usr/lib/mozilla/plugins/libjavaplugin.so (mozilla-javaplugin.so) in auto mode.
Oracle JRE 8 browser plugin installed
No comments:
Post a Comment