?????e???????????????????????????PC?????????????MacBook Pro????????????????????????????????????????????г??????MacBook????????????б??譎?????????????Java????????????JavaScript???????
???????????μ???????????????????Windows?????XP / 7????Linux??Ubuntu /Mint/Cent OS??????д??????μ???????MacBook Pro?????е???OS X Yosemite Version 10.10.5??
????JDK
??????????????????£????Java???????????JDK??????????????????Java??ú?С????????????????????????Java???л?????JRE??????????/???????Java????????????javac?????鵵??jar???????????????javadoc????Java????????????????????
????????Mac OS X x64 .dmg???汾???
????Java 7
????Java 8

??????????????????????????/usr/libexec/java_home -v 1.7???????JDK????λ???
????Adrians-MacBook-Pro:ama ama$ /usr/libexec/java_home -v 1.8
????/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
????Adrians-MacBook-Pro:ama ama$ /usr/libexec/java_home -v 1.7
????/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
????Adrians-MacBook-Pro:ama ama$
???????統(tǒng)????IntelliJ???????????????????????Щ??
????????JAVA_HOME
????JAVA_HOME???????????????????Tomcat????????JavaEE??????????????????Maven????????Java????λ???????
??????Mac OSx 10.5??????汾?У?Apple?????$JAVA_HOME?????·?? /usr/libexec/java_home?£????? $JAVA_HOME????????? ~/. bash_profile or ~/.profile?С?
????$ vim .bash_profile
????export JAVA_HOME=$(/usr/libexec/java_home)
????$ source .bash_profile
????$ echo $JAVA_HOME
????/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
????Maven
??????????????????????ú?JAVA_HOME?????Apache Maven Downloads?????????.tar.gz ?? .zip??????????????????н??——??????????opt??????£?
????tar xzvf apache-maven-3.3.3-bin.tar.gz
???????鴴??????????Maven????????????????????Maven?汾???????????????????
????ln -s /opt/apache-maven-3.3.3/opt/maven
??????????????????????Maven??
????vim ~/.bash_profile
????export M2_HOME=/path/to/maven
????export M2=$M2_HOME/bin
????export PATH=$M2:$PATH
?????????????????μ???????????????maven?汾???????????????????
????ama$ mvn -version
????Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:37+02:00)
????Maven home: /opt/maven
????Java version: 1.8.0_65?? vendor: Oracle Corporation
????Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre
????Default locale: en_US?? platform encoding: UTF-8
????OS name: "mac os x"?? version: "10.10.5"?? arch: "x86_64"?? family: "mac"
???????????????????Homebrew???????????????
????brew install maven