linux centos 安装openjdk 1.8:
sudo yum install -y java-1.8.0-openjdk-devel.x86_64
sudo echo export JAVA_HOME=/usr/lib/jvm/java >> /etc/profile
sudo echo export PATH=$JAVA_HOME/bin:$PATH >> /etc/profile
sudo echo export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar >> /etc/profile
source /etc/profile