Linux (CentOS) installation jdk (. tar.gz) and configure

Source: Internet
Author: User

The idea of this article turns from http://blog.sina.com.cn/s/blog_81631744010137iy.html

Click (here) to collapse or open

    1. 1, to Oracle (Oracle) Download the JDK not much to say
    2. Tar zxvf ****.tar.gz (****.tar.gz is the downloaded file name, unzip. )
    3. MV * * * * JDK (* * * is your extracted folder, change the name, I changed to JDK, love change what, I change this good to remember)
    4. MV jdk/usr/local/(then put the renamed folder to/usr/local/)
    5. Vi/etc/profile (edit config, environment variable bar)
    6. Last side join:
    7. Java_home=/usr/local/jdk
    8. Export JRE_HOME=/USR/LOCAL/JDK/JRE
    9. Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
    10. Export path= $JAVA _home/bin: $JRE _home/bin: $PATH
    11. Then modify the default JDK:
    12. Update-alternatives--install/usr/bin/java Java/usr/java/bin/java 300
    13. Update-alternatives--install/usr/bin/javac Javac/usr/java/bin/javac 300
    14. Update-alternatives--config Java
    15. Update-alternatives--config Javac
    16. Finally see the success?
    17. Java-version
    18. Javac-version

Linux (CentOS) installation jdk (. tar.gz) and configure

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.