#!/bin/bash -ex

JDK_FILE="/usr/local/lib/jdk1.8.0_171.zip"

cd /usr/local/lib
unzip ${JDK_FILE}
rm ${JDK_FILE}

cd /usr/local/lib/jdk*
mkdir -p /usr/lib/jvm/
chmod a+w /usr/lib/jvm
ln -sf $(pwd) /usr/lib/jvm/java-8-oracle
