Ubuntu tutorial-manual installation of Oracle Java JDK 8 in Ubuntu

Source: Internet
Author: User
Tags java jdk 8

This short tutorial will demonstrate how to install the latest Java JDK 8 released by Oracle in Ubuntu. The method used here is to teach you how to download the installation package from the download page, and then install the package in Ubuntu without using external PPA or third-party source code.

This method does not depend on a third-party source warehouse. You only need to download it from the official Oracle download page and install it.

JDK 8 is an important release version. It also incorporates the latest new language function called Lambda expressions. This function can be used as a method parameter or a code block as a date data ".

-------------------------------------- Split line --------------------------------------

Install and configure JDK1.7.0 _ 55 in Linux

JDK environment variable settings on Red Hat Linux

Ubuntu 14.04 configure Java SE JDK-7u55

Ubuntu 12.04 LTS installation and configuration JDK1.6.0 _ 45

Install the official JDK under Fedora 20 to replace OpenJDK and configure environment variables.

Install jdk-7u45-linux-x64.tar.gz on Ubuntu 12.04x64

Install and configure Java JDK in Ubuntu 12.04

-------------------------------------- Split line --------------------------------------

This version also released a new java. util. stream package class set that provides stream-based APIs to support function-based operations.

For more information about this release, visit its release home page @ http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html

To download and install Java JDK 8, visit the download page to obtain the latest release version. You can download a 32-bit or 64-bit release version based on your Ubuntu system.

Here is the download page

You must accept the license agreement before downloading.

Download and save the file. In Ubuntu, the Firefox browser will save it to ~ by default ~ /Downloads directory.

Step 2: Open the terminal and run the following command to decompress the downloaded file.

tar -xvf ~/Downloads/jdk-8-linux-x64.tar.gz

Run the following command to create a directory in the/usr/lib directory to save the Java JDK 8 file.

sudo mkdir -p /usr/lib/jvm/jdk1.8.0/

Next, run the following command to move the decompressed JDK file content to the Created directory.

sudo mv jdk1.8.0/* /usr/lib/jvm/jdk1.8.0/

Next, run the following command 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 for execution to enable the 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 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 has been fully installed, run the following command to test.

java –version 

I wish you a good time ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.