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