How to install Sun Java JDK via command line and wget

Our business software REWOO Scope runs as a Java application and uses the Sun Java JDK under CentOS 7 (minimal package). To setup a linux system with a running Sun Java, you need a browser and working filetransfer – but why not use wget to download the missing file?

Simple question, difficult answer: Sun dissalowed direct downloads of java from their servers. You have to agree with the license conditions by browser.
It seems that a single cookie is all that is needed to bypass this. If you want to download jdk7u67 for 64-bit Linux using wget, you can use:

wget --no-cookies --no-check-certificate\
--header "Cookie:; oraclelicense=accept-securebackup-cookie"\

But remember: each version of Java is located in a different folder. For other versions than 7u67 you have to use the respective URL.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s