private static @Nullable Path getJavaHome() {
    Path javaHome = Path.of(SystemProperties.getJavaHome());
    return Files.isDirectory(javaHome) ? javaHome : null;
  }
private static @Nullable Path getJavaHome()