删除java




在/usr/loca1目录下新建iava文件夹

sudo mkdir /usr/local/java

卸载jdk

sudo apt-get purge openjdk*

解压到该目录下

sudo tar -zxvf jdk-8u301-linux-x64.tar.gz -C /usrlocal/java

打开 /etc/profile 文件

sudo vi /etc/profile

在文件末尾添加如下代码并保存

# set java environment

export JAVA HOME=/usr/local/java/jdk1.8.9 301

export JRE HOME=$ JAVA HOME}/jre

CLASSPATH=.:$JAVA HOME1/1ib:$ JRE HOME1/1ibexport

export PATH=$JAVA HOMET/bin:$PATH


分享 :
评论(0)