Install Java JDK under Ubuntu

Source: Internet
Author: User

First, download the JDK

Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Recommended Download tar.gz format

Second, installation

1. Extract to the specified directory

Find the installation package you downloaded, unzip to the specified directory

Command tar zxvf jdk-8u60-linux-i586.tar.gz-c/opt/(here-c/opt/for decompression path)

==> to see if the cd/opt/is successful after extracting LS

2. Configure Environment variables

When Ubuntu starts, it scans all the. sh files under the/ETC/PROFILE.D folder.

So create a new java.sh in this directory and configure the Jak related information as follows:

Java_home=/usr/java/jdk1.8.0_45
Path= $JAVA _home/bin: $PATH
Expert Java_home PATH

This configuration, the next time after the launch will take effect, if the first effective and do not want to restart, you can use

Command: Source/etc/profile

See if the echo $JAVA _home is successful if you return to the path.

Check to see if Java installs the success command java-version




Install Java JDK under Ubuntu

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.