I took a look at the trick you posted. I understand there is no technical limitation to getting the Oracle JDK and JRE but there is still a legal limitation on it. At the top of the trick he says
"Oracle has recently disallowed direct downloads of java from their servers (without going through the browser and agreeing to their terms, which you can look at here: http://www.oracle.com/technetwork/java/javase/terms/license/index.html). "
Which reinforces that licensing issue with the JDK and JRE for us. And even if we went through with using that wget method, it has broken in the past and has possibility of breaking in the future if Oracle changes the headers to pass to them. I would recommend not packaging or including scripts to auto fetch the JDK and JRE and instead continue with requiring users to obtain it themselves.