add jdk6 compatibility check