标签:.gz img code tools pat .com htm html col
下载jdk https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
在local下创建java文件夹
解压 tar -zxvf jdk-8u191-linux-x64.tar.gz
然后进入 etc/profile,配置环境变量
export JAVA_HOME=/usr/local/java/jdk1.8.0_191
export JRE_HOME=/usr/local/java/jdk1.8.0_191/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
然后Java -version
通过which java 找到java路径 然后 rm -rf 删除
然后去 /etc/profile,将环境变量删除就ok了
标签:.gz img code tools pat .com htm html col
原文地址:https://www.cnblogs.com/mapleins/p/10151653.html