Closed josvazg closed 12 years ago
+1 on this issue.
I mean I also encountered it trying to install java on a fresh VM
+1 issue. please fix
The problem is that oracle prevents direct download of the .bin file. The download page now redirects to http://download.oracle.com/errors/download-fail-1505220.html because of a missing cookie. Oracle is forcing users to accept the EULA.
[x] Downloading jdk-6u31-linux-i586.bin : 81.34 MB --2012-03-27 12:53:58-- http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin
Resolving download.oracle.com... 92.122.124.41, 92.122.124.32
Connecting to download.oracle.com|92.122.124.41|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin [following]
--2012-03-27 12:53:58-- https://edelivery.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin
Resolving edelivery.oracle.com... 2.18.226.174
Connecting to edelivery.oracle.com|2.18.226.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2012-03-27 12:53:59-- http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com|92.122.124.41|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: `/var/local/oab/pkg/jdk-6u31-linux-i586.bin'
+1
Hi, while this isn't solved I did the following:
Obviously its not the best solution. But solves the problem if you can't wait the good solution...
For the last few days people are reporting this exact problem on my project due to a message that suggests them to do so. I don't believe any automated download of Java packages will work as Oracle really doesn't like it. I'd recommend at least adding checksum validation to be sure the files were downloaded successfully.
It seems that it's possible to download *.bin files via "http://java.com/en/download/manual.jsp?locale=en" directly without cookies or javascript. Unfortunately, the URLs do not make any sense so one needs to parse the HTML to locate the correct label and then proceed to fetch the file.
For example, link "Linux (self-extracting file)" points to "http://javadl.sun.com/webapps/download/AutoDL?BundleId=59621" which will emit the correct contents for jre-6u31-linux-i586.bin (or at least that binary is self-extracing sh script). It might be doable to search for
<a title=" Download Java software for Linux (self-extracting file)" href="(.*?)"
and
<a title=" Download Java software for Linux x64" href="(.*?)"
to extract download URLs from the URL "http://java.com/en/download/manual.jsp?locale=en".
+1 for this as well
I spent a bit of time on the Oracle site last night and looked at the problem.
You can grab the file like so:
curl -OL -b "oraclelicensejdk-6u31-oth-JPR=accept-securebackup-cookie;gpw_e24=http://edelivery.oracle.com" 'http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64.bin'
Fixed in this pull request: https://github.com/flexiondotorg/oab-java6/pull/20
As of version 26, this is happening again.
The repository building process fails with this message: Downloading common.sh [x] Installing Java build requirements success [x] Making build directories success [x] Removing clones of https://github.com/rraptorr/sun-java6 success [x] Cloning https://github.com/rraptorr/sun-java6 success [x] Checking out v6.31-1 success [x] Getting Java SE download pagesuccess [x] Getting current release download page success [x] Downloading jdk-6u31-linux-i586.bin : 81.34 MB success [x] Symlinking jdk-6u31-linux-i586.bin success [x] Downloading jdk-6u31-linux-x64.bin : 81.62 MB success [x] Symlinking jdk-6u31-linux-x64.bin success [x] Updating the changelog success [x] Building the packages success ERROR! Packages failed to build. Please raise an issue with the upstream script developer - https://github.com/rraptorr/sun-java6/issues
The last lines of the log are:
rm -rf jdk1.6.0_31 binsize=$(wc -c jdk-6u31-linux-i586.bin | awk '{print $1}'); \ zipstart=$(unzip -ql jdk-6u31-linux-i586.bin 2>&1 >/dev/null | sed -n -e 's/.* ([0-9][0-9]) extra bytes./\1/p'); \ tail -c $(expr $binsize - $zipstart) jdk-6u31-linux-i586.bin > tmp-jdk.zip expr: syntax error tail: jdk-6u31-linux-i586.bin: invalid number of bytes make: *\ [unpack-i586-stamp] Error 1 dpkg-buildpackage: fallo: debian/rules build devolvió un estado de salida de error 2 30810's retcode: 2 success