Add support for Oracle Java 8

issue #1048 
Could you add a few lines of comment explaining what this bash is doing (since it's not obvious)