allow for .tar.gz or .gz in oracle tarball name
refactor build script; support jdk8