This brief tutorial will demonstrate how to install Oracle's latest release of the Java JDK 8 in the Ubuntu system. The method used here is to teach you how to download the installation package from the download page, then install Ubuntu PPA does not use external or third-party source.
This method does not rely on third-party source repository. You just download page from Oracle's official direct download and then installed on the line.
JDK 8 is a major release, also joined the latest called Lambda expressions new language feature that can "function is used as the method parameter, or a block of code using the data as a date."
This version also released a new collection of bags java.util.stream, provides flow-based API, to support the functional operation function.
For more information about the release version, visit its home page @ http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html release
To download and install Java JDK8, visit the download page for the latest releases. The basis of your machine Ubuntu system can choose to download the 32-bit or 64-bit release.
Here is the download page
Before downloading, you must accept the license agreement.
Download the file and save. In the Ubuntu system, Firefox browser will default saved to ~ / Downloads directory.
The second step, open a terminal and run the following command to decompress the downloaded file.
tar -xvf ~ / Downloads / jdk-8-linux-x64.tar.gz
Then run the following command to create a directory to save the Java JDK 8 files in / usr / lib directory.
sudo mkdir -p /usr/lib/jvm/jdk1.8.0/
Next, run the following command to extract the contents of JDK files are moved to the directory created.
sudo mv jdk1.8.0 / * /usr/lib/jvm/jdk1.8.0/
Next, run the following commands to configure Java
sudo update-alternatives --install "/ usr / bin / java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
Next, copy and paste the following line to the terminal execution to enable Javac module.
sudo update-alternatives --install "/ usr / bin / javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
Finally, copy and paste the following line to the terminal in order to complete the final installation.
sudo update-alternatives --install "/ usr / bin / javaws" "javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1
To verify whether Java is already under fully installed, you can run the following command to test.
I wish you have fun ~