dpkg -l | grep openjdk
apt-get remove openjdk*
mv jdk-8u144-linux-i586.tar.gz /opt/
tar -zxvf jdk-8u144-linux-i586.tar.gz
- 配置jdk变量,设置系统环境
- 注意使用的jdk版本及位数
update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_144/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_144/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.8.0_144/jre/lib/i386/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.8.0_144/bin/java
update-alternatives --set javac /opt/jdk1.8.0_144/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.8.0_144/jre/lib/i386/libnpjp2.so
java -version