1

I'm trying to get JDK 1.6 using the following command:

wget 'http://download.oracle.com/otn/java/jdk/6u14-b08/jdk-6u14-linux-x64.bin'

The download fails and I suspect it's related to the fact that the website requires you to accept the license agreement. Is there a way to accept the agreement and receive the file?

ish
  • 141,990
KalenGi
  • 415
  • 2
  • 8
  • 10

2 Answers2

1

I will go ahead and post it just in case....Please note however that these instruciton install Java7 NOT Java6

cut and paste from http://www.webupd8.org

Install Oracle Java 7

For most stuff, OpenJDK/JRE is enough (and you can install it using Ubuntu Software Center), but in case you really need Oracle (previously Sun) Java 7, you can install it (this will install JDK/JRE and the browser plugin) in Ubuntu using the WebUpd8 Java PPA

in terminal type

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

This is a excerpt of my answer to this question.

The PPA that you install with thesecommands only points to the Java website to make installing easier, it does not contain Java itself. Oracle changed the license and now it can not be hosted anywhere and can only be downloaded directly from Oracle..

HERE is an older post from the same site that gives more information on this change as well as more information on Java7 itself and how to remove it , check for and select which version is running.

TrailRider
  • 7,157
0

If you accept the agreement once you can then use the --load-cookies FILE option to wget to get it to use the saved cookie (e.g. from your .mozilla folder) to do the download. I don't see another way of doing it.

So

  1. Accept the agreement in Firefox
  2. Use wget --load-cookies ~/.mozilla/firefox/XXXX.default/cookies.txt URL

Caveat

Only works with old firefox cookies store - not the new sqlite backend.

Alternative

Alternatively you can install the Sun JDK from the repos as TrailRider hinted at - the license agreement is done during the install.

jmetz
  • 1,171