Added check for JRE >= 1.6