Tuesday, November 25, 2014

Install JAVA using command-line only


 wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.rpm


curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.rpm > jdk-8u25-linux-x64.rpm


  • -j -> junk cookies
  • -k -> ignore certificates
  • -L -> follow redirects
  • -H [arg] -> headers
curl can be used in place of wget.
 

1 comment:

  1. Above steps were for CentOS :
    For Ubuntu Oracle JDK steps are as below:
    sudo apt-get install python-software-properties
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer

    https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get


    ReplyDelete