def _parse_java_version(line: str) -> tuple:
m = VERSION_RE.search(line)<EOL>version_str = m and m.group(<NUM_LIT:0>).replace('<STR_LIT:">', '<STR_LIT>') or '<STR_LIT>'<EOL>if '<STR_LIT:_>' in version_str:<EOL><INDENT>fst, snd = version_str.split('<STR_LIT:_>', maxsplit=<NUM_LIT:2>)<EOL>version = parse_version(fst)<EOL>return (version[<NUM_LIT:1>], version[<NUM_LIT:2>], int(snd))<EOL><DEDENT>else:<EOL><INDENT>return parse_version(version_str)<EOL><DEDENT>
Return the version number found in the first line of `java -version`

    >>> _parse_java_version('openjdk version "11.0.2" 2018-10-16')
    (11, 0, 2)