树莓PI安装jdk1.8,ant,maven【转】

http://the.taoofmac.com/space/hw/RaspberryPi/JDK%20Installation

jdk
-------------------------------------
# unpack sudo tar -zxvf jdk-8u6-linux-arm-vfp-hflt.tar.gz -C /opt # let the system know there's a new JVM sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0_06/bin/java" 1 sudo update-alternatives --set java /opt/jdk1.8.0_06/bin/java


ant
--------------------------------------
wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.3-bin.tar.gz
cd /opt/java
sudo tar -zxvf apache-ant-1.9.3-bin.tar.gz
sudo ln -s apache-ant-1.9.3 ant 
sudo rm -rf apache-ant-1.9.3/manual/


maven
--------------------------------------
sudo wget http://archive.apache.org/dist/maven/binaries/apache-maven-3.2.1-bin.tar.gz cd /opt/java sudo tar -zxvf apache-maven-3.2.1-bin.tar.gz sudo ln -s apache-maven-3.2.1 maven


~/.bashrc
----
追加

export JAVA_HOME=/opt/jdk1.8.0_06
export PATH=$PATH:/opt/jdk1.8.0_06/bin:/opt/java/ant/bin:/opt/java/maven/bin

生效
source ~/.bashrc


posted @ 2014-10-08 15:10  小菜鸟_yang  阅读(1104)  评论(0编辑  收藏  举报