fix travis CI compile error by specifying java version