#tar -xvf jdk-8u131-linux-x64.tar.gz,執行命令後報錯以下:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting nowjava
在wget後添加一下 --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" 命令以下: wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" 「你須要下載的東西」 [root@zuitu source]# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
[root@zuitu script]# tail -n 5 /etc/profile #環境變量設置 #Java Env export JAVA_HOME=/server/source/jdk1.8.0_191 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin [root@zuitu script]# java -version java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode) [root@zuitu script]#
更多的博客轉移到我的博客上了,請點擊如下連接:
我的博客linux