This discussion is archived
6 Replies Latest reply: Apr 14, 2012 6:18 PM by 649753 RSS

wget for Oracle JDK is broken

926690 Newbie
Currently Being Moderated
Sometime over the weekend, Oracle broke the ability to use wget from the command line to retrieve the JDK.

I tested this multiple times over the past two weeks as we were refining our VM build process.

This worked for JDK 1.6.0_31:
wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64.bin

And this worked for JDK 1.7.0_03:
wget http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz

Now both of those wget commands return a small HTML file that states:
"In order to download products from Oracle Technology Network you must agree to the OTN license terms."
and
"Be sure that...
Your browser has "cookies" and JavaScript enabled.
You clicked on "Accept License" for the product you wish to download.
You attempt the download within 30 minutes of accepting the license."

Short of writing a script that will go to the main download page, accept the license, and then use the resulting cookie for the wget of the actual file, there is now no way to automate installation of the Oracle JDK on Linux.

If Oracle's goal is to drive all of us to use the OpenJDK, they're doing a good job.

Has anyone figured out a work-around for this? Or written a Ruby script to agree to the license and then use the cookie to get the file?
  • 1. Re: wget for Oracle JDK is broken
    gimbal2 Guru
    Currently Being Moderated
    923687 wrote:
    If Oracle's goal is to drive all of us to use the OpenJDK, they're doing a good job.
    I believe that is the general idea where bundling Java is concerned, yes. Any half-decent Linux OS should be able to install OpenJDK through its package management and not require you to do scripting hacks.
    Has anyone figured out a work-around for this?
    Think about it. Oracle wants you to agree to a license before you are allowed to download it. Trying to circumvent that is probably illegal, or at least shady business that any company that does not want the risk of legal charges should want any part of.

    At the very least, it ain't exactly too good an idea to ask for such "help" in the Oracle forums!
  • 2. Re: wget for Oracle JDK is broken
    926690 Newbie
    Currently Being Moderated
    But the issue is that it was working at least until Saturday. Oracle changed their licensing last year to preclude Linux distributions from packaging Oracle's JDK, but they didn't break wget along with that. Something changed over the weekend, but I cannot find any statements of changes of policy other than the resulting file is no longer a valid tar.gz file, but is an HTML file containing the notices that I quoted above.

    (Or more likely, Oracle didn't realize that they'd left wget wide open and they finally realized it and clamped down over the weekend.)

    I know that OpenJDK is available. And it is getting better. But there are still some issues. To be honest, the main thing that we're using Oracle's JDK for is for determining if some issues we see are really being caused by OpenJDK.

    Worst case, we can agree to the OTN license once, place the file on our internal server, and then use it from there for VM creation.

    This just strikes me as yet another finger in the eye of the Java community by Oracle. Oracle is dead to me. Hello OpenJDK and PostgreSQL.
  • 3. Re: wget for Oracle JDK is broken
    gimbal2 Guru
    Currently Being Moderated
    923687 wrote:
    But the issue is that it was working at least until Saturday.
    Doesn't matter. What matters is that Oracle wants you to agree to the license now. Perhaps the issue was that until now you were doing things you weren't supposed to be doing; at least now you can know.

    (I can't remember ever being able to download anything through the website, going all the way back to the Sun days, without having to select a radio indicating I accept the license agreement by the way; this is indeed a hole that has been plugged).
    This just strikes me as yet another finger in the eye of the Java community by Oracle. Oracle is dead to me. Hello OpenJDK and PostgreSQL.
    Eh, OpenJDK, even though it is an open source effort, is still sponsored by Oracle themselves... What you call the "Oracle JDK" is still OpenJDK with extra fluff around it.
  • 4. Re: wget for Oracle JDK is broken
    649753 Explorer
    Currently Being Moderated
    Hi,

    Unfortunately we have to require license acceptance prior to download. This can be implemented in one of two ways. Either we require registration and log in prior to download, and as part of registering you agree to reading and complying with licenses. Or we use a click-through on download which avoids the need to register and log in. We have chosen the latter for Java downloads as the least intrusive method. We found out some time ago that scripts were being used to circumvent click-through (in violation of site policies, and frankly also of common sense) and have plugged this hole.

    We understand that this makes command line updates from our main website for Linux users impossible and are actively looking for other ways to enable this use case.

    Oracle JDK is based on OpenJDK (with a few added components like a closed-source font rasterizer that we license from a third party) and the latter is available as part of most Linux distributions, so it is a good option unless you specifically need the Oracle certified binaries.

    Regards,

    Henrik Ståhl
    Sr. Director, Product Management
    Java Platform Group
    Oracle
  • 5. Re: wget for Oracle JDK is broken
    929737 Newbie
    Currently Being Moderated
    The notion that you have to shrink wrap the software behind a click-through in order to enforce the license agreement is contradictory to the license itself. Consider, that the JavaSE license clearly stipulates "...BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THE TERMS AND AGREE TO THEM."

    Consider also, that for Enterprise Linux users the Oracle Java portal is now the only place to retrieve a JDK/JRE certified to operate with many third-party products. It is certainly convenient to install OpenJDK from the command line as an alternative. However, in many cases the OpenJDK runtime is NOT certified to operate correctly with all Java based solutions.

    Prior to this change on Oracle's Java portal our own organization could use simple Configuration Management code with solutions such as Chef/Puppet to install either OpenJDK, or Oracle Java runtimes, as needed. If it is simply not possible to allow direct script access to the Java installers on the OTN website, then why not make that available as a convenience in Oracle's Public Yum repository as a convenience to Oracle customers on RHEL and OEL?
    Henrik Stahl wrote:
    Hi,

    Unfortunately we have to require license acceptance prior to download. This can be implemented in one of two ways. Either we require registration and log in prior to download, and as part of registering you agree to reading and complying with licenses. Or we use a click-through on download which avoids the need to register and log in. We have chosen the latter for Java downloads as the least intrusive method. We found out some time ago that scripts were being used to circumvent click-through (in violation of site policies, and frankly also of common sense) and have plugged this hole.

    We understand that this makes command line updates from our main website for Linux users impossible and are actively looking for other ways to enable this use case.

    Oracle JDK is based on OpenJDK (with a few added components like a closed-source font rasterizer that we license from a third party) and the latter is available as part of most Linux distributions, so it is a good option unless you specifically need the Oracle certified binaries.

    Regards,

    Henrik Ståhl
    Sr. Director, Product Management
    Java Platform Group
    Oracle
  • 6. Re: wget for Oracle JDK is broken
    649753 Explorer
    Currently Being Moderated
    re: Making auto installs of Oracle JDK from a suitable online repo possible (maybe ULN)...we are looking at it.

    I don't understand the reluctance towards OpenJDK. It is 98% or so identical with Oracle JDK and a good option, especially for Linux users. It used to be more different but we have been working hard towards reducing the diff, and the GPL+CPE license is a good match for Linux (intentionally so).

    Henrik

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points