docs: public static JvmType createFromJavaHome(final String javaHome, boolean forLaunch) {
          if (javaHome == null || javaHome.trim().equals("")) {
              throw HostControllerLogger.ROOT_LOGGER.invalidJavaHome(javaHome);
          }
          final File javaHomeDir = new File(javaHome);
          if (forLaunch && !javaHomeDir.exists()) {
              throw HostControllerLogger.ROOT_LOGGER.invalidJavaHome(javaHomeDir.getAbsolutePath());
          }
          final File javaBinDir = new File(javaHomeDir, BIN_DIR);
          if (forLaunch && !javaBinDir.exists()) {
              throw HostControllerLogger.ROOT_LOGGER.invalidJavaHomeBin(javaBinDir.getAbsolutePath(), javaHomeDir.getAbsolutePath());
          }
          final File javaExecutable = new File(javaBinDir, JAVA_EXECUTABLE);
          if (forLaunch && !javaExecutable.exists()) {
              throw HostControllerLogger.ROOT_LOGGER.cannotFindJavaExe(javaBinDir.getAbsolutePath());
          }
          return new JvmType(forLaunch, isModularJvm(javaExecutable.getAbsolutePath(), forLaunch), javaExecutable.getAbsolutePath());
      }