fixed problem with invalid javaVersion. removed java 8 method call