命令

wget--header"Cookie:oraclelicense=accept-securebackup-cookie"http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gzmkdir-p/usr/lib/jvm/oracle_jdk8tar-zxfjdk-8u5-linux-x64.tar.gz-C/usr/lib/jvm/oracle_jdk8update-alternatives--install/usr/bin/javajava/usr/lib/jvm/oracle_jdk8/jre/bin/java2000update-alternatives--install/usr/bin/javacjavac/usr/lib/jvm/oracle_jdk8/bin/javac2000update-alternatives--configjavaupdate-alternatives--configjavacexportJ2SDKDIR=/usr/lib/jvm/oracle_jdk8exportJ2REDIR=/usr/lib/jvm/oracle_jdk8/jreexportPATH=$PATH:/usr/lib/jvm/oracle_jdk8/bin:/usr/lib/jvm/oracle_jdk8/db/bin:/usr/lib/jvm/oracle_jdk8/jre/binexportJAVA_HOME=/usr/lib/jvm/oracle_jdk8exportDERBY_HOME=/usr/lib/jvm/oracle_jdk8/db

doc