Installing the Hadoop series-Installing JDK-8U5

Source: Internet
Author: User

The installation steps are as follows: 1) Download JDK 8
Choose to download the latest JDK version of JDK 8 from http://www.oracle.com/technetwork/java/javasebusiness/downloads/. I chose to: jdk-8u5-linux-x64.tar.gz This version of the JDK does not need to install, only need to decompress, and then configure the environment variables. 2) Create a new folder#sudo mkdir-p/usr/local/java 3) Copy the downloaded JDK to the directory below.
#sudo Cp/home/hadoop/downloads/jdk-8u5-linux-x64.tar.gz/usr/local/java 4) Unzip the JDK#cd/usr/local/java
#sudo Tar zxvf jdk-8u5-linux-x64.tar.gz
#sudo RM jdk-8u5-linux-x64.tar.gz
#sudo ln-s Jdk1.8.0_05/usr/local/java/latest//To establish a soft link, if you want to update the JDK after the installation, and then update the soft link, do not update the environment variables, so you can be unified management. 5) Configure environment variables#sudo gedit/etc/environment Modify path in environment, append the JDK path, add classpath and Java_home, with the following contents: Java_home= "/usr/local/java/ Latest
Jre_home= "/usr/local/java/latest/jre"
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/java/latest/bin" Remember to let the environment variable configuration take effect source #source/etc/environment 6) Then tell the system that we're using Sun's jdk, not openjdk# sudo update-alternatives--install/usr/bin/java Java/usr/local/java/jdk1.8.0_05/bin/java 300
# sudo update-alternatives--install/usr/bin/javac javac/usr/local/java/jdk1.8.0_05/bin/javac # sudo update-altern Atives--config Java

7) Test if the installation is successful:# java-version
Java Version "1.8.0_05"
Java (TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot (TM) 64-bit Server VM (build 25.5-b02, Mixed mode) successfully installed! Reference: http://www.myexception.cn/eclipse/1642383.html

Installing the Hadoop series-Installing JDK-8U5

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.