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:
# 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
# there is a manual license screen here:
apt-get install oracle-java8-installer