Handle versions of java with slightly different format