JDK:
1.百度搜索jdk下载,进入oracle官网
比如:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. 在linux 进行下载该链接 使用 wget:
wget http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1540342427_809ad364252619cfb154c21f1778bc21
3.解压:
tar -zxf jdk-8u191-linux-x64.tar.gz\?AuthParam\=1540342427_809ad364252619cfb154c21f1778bc21
4.配置环境变量:
编辑vi /etc/profile 加入如下内容,JAVA_HOME 为本地jdk安装目录
export JAVA_HOME=/home/jdk/jdk1.8.0_191 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH