update api to support jdk 1.6