Linux Installation configuration JDK

Source: Internet
Author: User

Download (Oracle website)

Http://www.oracle.com/technetwork/java/javase/downloads/index.html

Install your own requirements to download the appropriate version

Choose a 64-bit jdk-7u79-linux-x64.tar.gz here

Installing the configuration JDK

1. Copy the jdk-7u79-linux-x64.tar.gz to the/usr/local directory (usually your own software is placed in this directory)
2.TAR-ZXVF jdk-7u79-linux-x64.tar.gz-c/usr/local/
3. Get the/usr/local/jdk1.7.0_79 directory
4. Modify the/etc/profile file: Vim/etc/profile
5. Add the profile last
Export java_home=/usr/local/jdk1.7.0_79
Export JRE_HOME=/USR/LIB/JDK/JDK1.7.0_10/JRE
Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH
Export classpath= $CLASSPATH:.: $JAVA _home/lib: $JAVA _home/jre/lib
6. Modify the default JDK in Linux
sudo update-alternatives--install/usr/bin/java Java/usr/local/jdk1.7.0_79/bin/java 300
sudo update-alternatives--install/usr/bin/javac Javac/usr/local/jdk1.7.0_79/bin/javac 300
sudo update-alternatives--config java
sudo update-alternatives--config javac
7. See if the modification was successful: java-version
Java Version "1.7.0_79"
Java (TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot (TM) 64-bit Server VM (build 24.79-b02, Mixed mode)

If you find a problem or have questions, please let me know in time.

Linux installation configuration JDK

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.