jdk.txt 590 B

1234567891011121314151617
  1. 1、下载地址
  2. wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz"
  3. 2、添加环境变量
  4. vi /etc/profile
  5. JAVA_HOME=/usr/local/jdk/jdk1.8.0_141
  6. JRE_HOME=/usr/local/jdk/jdk1.8.0_141/jre
  7. CLASS_PATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
  8. PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
  9. export JAVA_HOME JRE_HOME CLASS_PATH PATH
  10. 3、使环境变量生效
  11. source /etc/profile
  12. 4、检查
  13. java -version