checking for java in errormsg