下载oracle java
sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update sudo apt-get install oracle-java8-installer sudo apt-get install oracle-java8-set-default
配置环境变量
1、sudo vim etc/profile 2、export ANDROID_JAVA_HOME=/usr/lib/jvm/java-6-oracle
export PATH=$ANDROID_JAVA_HOME/bin:$ANDROID_JAVA_HOME/lib:$PATH
export CLASSPATH=.:$ANDROID_JAVA_HOME/lib
使配置环境生效
source /ect/prfile