Announcement

Collapse

http://progeeking.com

See more
See less

Downloading Oracle JVM without browser

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Downloading Oracle JVM without browser

    # Downloading Oracle JVM without browser

    Oracle requires you to accept its licence agreement before downloading its JVM.
    It's a pain for those of us who do automation, native packages, Jenkins JVM deployment on slave...

    I used Firefox and Firebug to sniff network exchanges.

    ## HTTP Request :

    GET /otn-pub/java/jdk/6u39-b04/jdk-6u39-linux-i586.bin?AuthParam=1359814101_9685f919f8b3113a8957 4ec4570d47b2 HTTP/1.1
    Host: download.oracle.com
    User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: fr,en-us;q=0.7,en;q=0.3
    Accept-Encoding: gzip, deflate
    Referer: http://www.oracle.com/technetwork/ja...s-1902814.html
    Cookie: s_nr=1359635827494; s_cc=true; gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork% 2Fjava%2Fjavase%2Fdownloads%2Fjdk6downloads-1902814.html; s_sq=%5B%5BB%5D%5D; gpv_p24=no%20value
    Connection: keep-alive

    # Using curl

    curl -L --header "Cookie: s_nr=1359635827494; s_cc=true; gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork% 2Fjava%2Fjavase%2Fdownloads%2Fjdk6downloads-1902814.html; s_sq=%5B%5BB%5D%5D; gpv_p24=no%20value" http://download.oracle.com/otn-pub/j...-linux-x64.bin -o jdk-6u39-linux-x64.bin

    curl -L --header "Cookie: s_nr=1359635827494; s_cc=true; gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork% 2Fjava%2Fjavase%2Fdownloads%2Fjdk6downloads-1902814.html; s_sq=%5B%5BB%5D%5D; gpv_p24=no%20value" http://download.oracle.com/otn-pub/j...-linux-x64.bin -o jdk-6u41-linux-x64.bin

    # Using wget

    wget --no-cookies --header "Cookie: s_nr=1359635827494; s_cc=true; gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork% 2Fjava%2Fjavase%2Fdownloads%2Fjdk6downloads-1902814.html; s_sq=%5B%5BB%5D%5D; gpv_p24=no%20value" http://download.oracle.com/otn-pub/j...-linux-x64.bin

    wget --no-cookies --header "Cookie: s_nr=1359635827494; s_cc=true; gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork% 2Fjava%2Fjavase%2Fdownloads%2Fjdk6downloads-1902814.html; s_sq=%5B%5BB%5D%5D; gpv_p24=no%20value" http://download.oracle.com/otn-pub/j...-linux-x64.bin


    You should be able to download Oracle JVMs from anywhere now.
    Enjoy

    Thanks to Kevin Decherf blog (http://blog.kdecherf.com/2012/04/12/...magic-cookies/), where I found to avoid injecting cookies but use a specific header

  • #2
    If you are looking to download the Oracle JDK from the command line using
    wget
    , there is a workaround. Run the
    wget
    command as follows:
    wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com""http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz"

    Comment

    Working...
    X