MAC OS Setup JDK summary

Source: Internet
Author: User

Start tossing Mac Pro, find some information on the Internet, I also tried a bit, special here to do a summary.

    • The location of the JDK in your Mac

OSX default JDK

/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

This is actually a symbolic link, which points to:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

OS x comes with a JRE

/System/Library/Frameworks/JavaVM.framework/Versions/Current

Oracle's JDK7

/Library/Java/JavaVirtualMachines/jdk1.7.0_xx.jdk/Contents/Home

Oracle's JRE7

/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

OPENJDK7

/Library/Java/JavaVirtualMachines/jdk1.7.0.jdk/Contents/Home

    • Setting environment variables

Set global variables for all users in your Mac:

Vi/etc/profile-This place is permanently active after modification and for all system users

Setting environment variables for the current user in Mac: (recommended)

VI. bash_profile

   

Set Java_home, PATH, and save exit after setting.

Console input source. bash_profile, the configuration information is in effect.

Check environment variables: Echo $PATH

Echo $JAVA _home

MAC OS Setup JDK summary

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.