Made JAVA check optional.