Oracle Adds License to oracle-java7-installer and Now It Fails

For automatic provisioning that installs the official Oracle Java package, many paths lead to WebUpd8Team/java PPA and

Currently, the apt-get-install oracle-java7-installer command will fail, leaving a file at /var/cache/oracle-jdk7-installer/jdk-7u51-linux-*.tar.gz that is a plain .html file that contains “Sorry! In order to download products from Oracle Technology Network you must agree to the OTN license terms”

Nothing I’ve tried will appease the Oracle license police.

Instead, my current “provision Java” script uses version “8” – as in “oracle-java8-installer“, which is working.

So, if you have the luxury of using java8 instead of java7, you can just update your provisioning scripts. My current script (because I’m tired of searching for the instructions) is below.

Run these commands as root:

# we need this to avoid weird "IP not found" errors:
apt-get update
# if you need to get 'add-apt-repository', you need python-software-properties
#uncomment# yes | apt-get install python-software-properties
yes | add-apt-repository ppa:webupd8team/java
apt-get update
# there is a manual license screen here:
apt-get install oracle-java8-installer

This entry was posted in Software Engineering, Ubuntu. Bookmark the permalink.