adapt jdk6