def METHOD_NAME(self, host, majors):
    """
    Resolves the path to a JDK with one of the provided major versions.
    :param majors: The major versions to check.
    :return: The resolved path to the JDK
    """
    defined_env_vars = self._get_defined_env_vars(host)
    java_home_env_var_names = [f"JAVA{major}_HOME" for major in majors]
    java_home_env_var_names.append("JAVA_HOME")
    resolved_major_to_java_home_path = {}
    for java_home_env_var_name in java_home_env_var_names:
        if java_home_env_var_name in defined_env_vars:
            major_to_java_home_path = self._resolve_major_from_java_home(host, java_home_env_var_name,
                                                                         defined_env_vars[java_home_env_var_name])
            if major_to_java_home_path:
                resolved_major_to_java_home_path.update(major_to_java_home_path)
    for major in majors:
        if major in resolved_major_to_java_home_path:
            return resolved_major_to_java_home_path[major]
    checked_env_vars = self._checked_env_vars(majors)
    raise SystemSetupError(f"Install a JDK with one of the versions {majors} and point to it with one of {checked_env_vars}.")