added check for java version