As already you know, canonical no longer redistribute the Java packages due to license issue. Canonical has removed the Java packages from their repository and now they distribute openjdk as an alternative, If you need Java on Ubuntu; you must do installation through the external repository. Here is the tutorial on installing Java JDK 8 on Ubuntu 14.10
Open Terminal ( Ctrl + Alt + T ).
Remove the OpenJDK from the system, if you have it already installed.
$ sudo apt-get remove --purge openjdk*
$ sudo add-apt-repository -y ppa:webupd8team/java
Run the following command to pull the packages information from the newly added repository.
$ sudo apt-get update
Issue the following command to install Java jdk 1.8.
$ sudo apt-get -y install oracle-java8-installer
While installing, you will be required to accept the Oracle binary licenses.
Verify java version
$ java -version java version "1.8.0_31" Java(TM) SE Runtime Environment (build 1.8.0_31-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)