added check for java