Saturday, March 8, 2014

download Oracle JDK / JRE from console / command prompt

Many a times we have to download JDK / JRE on remote machine through console. In most of the cases we tend to download it on our desktop and then upload it to the remote machine through SCP as the download link from Oracle website are not directly accessible. You need to first accept the agreement so that you get the download link. The link is not usable to download it using wget. It seems oracle site look at a cookie value which marks given download request as user's acceptance of agreement.  And that cookie is 


Now you can download it using wget by passing this cookie with required download link as follows

wget --header "Cookie:"