JDK installation in a Mac environment

Source: Internet
Author: User

Attention:

Install a high version of the JDK on the Mac, the best practice is not to uninstall the system comes with the jdk1.6, because a lot of IDE boot needs jdk1.6 support, of course, we can also modify the IDE's configuration file, but also cannot modify each, in order to avoid trouble, It is recommended to keep the system's own jdk1.6


First, download

    • Official website:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    • Baidu Cloud Disk: Http://pan.baidu.com/s/1dDcwNRV

Second, installation

    • Installation Interface

    • Verify that the terminal input is installed after

 
   
  
  1. java -version
    • Path default

Go to-->mac OS--Resource library-->java-->javavirtualmachine

Third, the configuration

    • Open Terminal, enter

 
   
  
  1. vi ~/.bash_profile

    • Add or modify

 
   
  
  1. export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home

    Export path= $JAVA _home/bin:

    • Reload profile

 
   
  
  1. source ~/.bash_profile

Note: This configuration method only applies to user environment variables, if the system updates, the previous configuration may fail, if you want to permanently change the configuration in the/etc directory in the profile file





JDK installation in a Mac environment

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.