-1

I am trying to download jdk-7u71-linux-x64.rpm in a linux box using wget, so that I could use that command later in some bash script to download jdk wherever the script is executed.

Tried different ways using : --no-check-certificate --no-cookies --header

One of them is : wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn/java/jdk/7u71-b14/jdk-7u71-linux-x64.rpm

Nothing worked! (Old answers are not working anymore)

Is there a way to download older JDK like 7u71?

Nikhil Kumar
  • 88
  • 11
  • Looks like Oracle redirects to authorization page before download. You can check it by visiting http://download.oracle.com/otn/java/jdk/7u71-b14/jdk-7u71-linux-x64.rpm – jahra May 28 '18 at 09:24
  • @jahra yeah, that's why I am looking for some answers here. It is really required for me to download this particular version, that too using wget command. Any way we can do this? – Nikhil Kumar May 28 '18 at 09:32
  • 1
    Basically, Oracle doesn't like people doing that. They want you to go to the website and click the button that says that you agree to the conditions. And they keep changing the way that the web page works. Whether they are doing it deliberately or not is unclear. But the obvious solution is to ... just do what they want you to do. – Stephen C May 28 '18 at 09:41
  • have you tried this https://stackoverflow.com/questions/10268583/downloading-java-jdk-on-linux-via-wget-is-shown-license-page-instead#10959815 – Arpit Agarwal May 28 '18 at 09:46
  • 1
    Is this for use just within one organisation? If so, you could just download it once and store it on an internal server, and then copy/download it from there. – Robin Green May 28 '18 at 09:46
  • @ArpitAgarwal yes I did went through that link, but nothing helped. it's all old methods before oracle changed its download link format. – Nikhil Kumar May 28 '18 at 09:51
  • Nice suggestion @RobinGreen ! though is there a way we can do what I am looking for? – Nikhil Kumar May 28 '18 at 14:24

1 Answers1

-2

You can also install java using tar file.

Download jdk-7u71-linux-x64.tar.gz tar file from http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html

Go to download location, open terminal to untar the downloaded file using command

tar -zxvf jdk-7u71*

Check whether jdk1.7.0_71 folder is created or not?

Update JAVA_HOME and PATH variable in bashrc using commands

vi ~/.bashrc

Append these two variables at last

export JAVA_HOME=pathtodownloads/jdk1.7.0_71

export PATH=$JAVA_HOME/bin:$PATH

save and exit vi-editor

do execute source ~/.bashrc in terminal

Check java installation with java -version