JRE 6 compatibility