public static boolean checkForJdk(@NotNull Path homePath) {
    return (Files.exists(homePath.resolve("bin/javac")) ||
            (SystemInfo.isWindows && Files.exists(homePath.resolve("bin/javac.exe")))) &&
           (isModularRuntime(homePath) ||                               // Jigsaw JDK/JRE
            Files.exists(homePath.resolve("jre/lib/rt.jar")) ||         // pre-modular JDK
            Files.isDirectory(homePath.resolve("classes")) ||           // custom build
            Files.exists(homePath.resolve("jre/lib/vm.jar")) ||         // IBM JDK
            Files.exists(homePath.resolve("../Classes/classes.jar")));  // Apple JDK
  }
public static boolean checkForJdk(@NotNull Path homePath)