add java6 support