This code does not work for new Jenkins versions anyway, because Java 6 is no longer supported. But if it magically works and installs something, it will be a subject to usage and license constraints documented in https://github.com/jenkinsci/jdk-tool-plugin