下載解壓放到/usr/lib/jdk/jdk8中java
sudo gedit /etc/profilelinux
末尾添加windows
export JAVA_HOME=/usr/lib/jdk/jdk8oop
export JRE_HOME=/usr/lib/jdk/jdk8/jrespa
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATHhadoop
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_HOME:$PATHget
export HADOOP_HOME=/usr/local/hadoopit
export PATH=$PATH:$HADOOP_HOME/binjdk
配置系統默認jdk,300是一個優先級數值:配置
sudo update-alternatives --install /usr/bin/java java /usr/lib/jdk/jdk8/bin/java 300
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jdk/jdk8/bin/javac 300
sudo update-alternatives --config java 選擇安裝的jdk
sudo update-alternatives --config javac
ANT:
windows:
ANT_HOME:C:\ant
Path:%ANT_HOME%\bin
linux:
sudo apt-get install ant