Centos6.6 Tar Package installation JDK

Source: Internet
Author: User
  1. Download JDK to Oracle (Oracle) no more.
  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

Centos6.6 Tar Package installation 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.