-using java instead of groovy