private static boolean isModularRuntime(String javaExec) {
    File jreHome = new File(javaExec).getParentFile().getParentFile();
    return jreHome != null && (new File(jreHome, "lib/jrt-fs.jar").isFile() || new File(jreHome, "modules/java.base").isDirectory());
  }
private static boolean isModularRuntime(String javaExec)