Fix download JDK example – supports new API and JDK 8.